mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_controller
This commit is contained in:
commit
9b9713073e
|
@ -38,7 +38,7 @@
|
|||
NS_CC_BEGIN
|
||||
|
||||
class Animation3D;
|
||||
class Bone;
|
||||
class Bone3D;
|
||||
/**
|
||||
* Animate3D, Animates a Sprite3D given with an Animation3D
|
||||
*/
|
||||
|
@ -92,7 +92,7 @@ protected:
|
|||
float _start; //start time 0 - 1, used to generate sub Animate3D
|
||||
float _last; //last time 0 - 1, used to generate sub Animate3D
|
||||
bool _playReverse; // is playing reverse
|
||||
std::map<Bone*, Animation3D::Curve*> _boneCurves; //weak ref
|
||||
std::map<Bone3D*, Animation3D::Curve*> _boneCurves; //weak ref
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -36,22 +36,22 @@ NS_CC_BEGIN
|
|||
*
|
||||
* @param m C3DMatrix representing the inverse bind pose for this Bone.
|
||||
*/
|
||||
void Bone::setInverseBindPose(const Mat4& m)
|
||||
void Bone3D::setInverseBindPose(const Mat4& m)
|
||||
{
|
||||
_invBindPose = m;
|
||||
}
|
||||
|
||||
const Mat4& Bone::getInverseBindPose()
|
||||
const Mat4& Bone3D::getInverseBindPose()
|
||||
{
|
||||
return _invBindPose;
|
||||
}
|
||||
|
||||
void Bone::setOriPose(const Mat4& m)
|
||||
void Bone3D::setOriPose(const Mat4& m)
|
||||
{
|
||||
_oriPose = m;
|
||||
}
|
||||
|
||||
void Bone::resetPose()
|
||||
void Bone3D::resetPose()
|
||||
{
|
||||
_local =_oriPose;
|
||||
|
||||
|
@ -60,7 +60,7 @@ void Bone::resetPose()
|
|||
}
|
||||
}
|
||||
|
||||
void Bone::setWorldMatDirty(bool dirty)
|
||||
void Bone3D::setWorldMatDirty(bool dirty)
|
||||
{
|
||||
_worldDirty = dirty;
|
||||
for (auto it : _children) {
|
||||
|
@ -69,7 +69,7 @@ void Bone::setWorldMatDirty(bool dirty)
|
|||
}
|
||||
|
||||
//update own world matrix and children's
|
||||
void Bone::updateWorldMat()
|
||||
void Bone3D::updateWorldMat()
|
||||
{
|
||||
getWorldMat();
|
||||
for (auto itor : _children) {
|
||||
|
@ -77,7 +77,7 @@ void Bone::updateWorldMat()
|
|||
}
|
||||
}
|
||||
|
||||
const Mat4& Bone::getWorldMat()
|
||||
const Mat4& Bone3D::getWorldMat()
|
||||
{
|
||||
if (_worldDirty)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ const Mat4& Bone::getWorldMat()
|
|||
return _world;
|
||||
}
|
||||
|
||||
void Bone::setAnimationValue(float* trans, float* rot, float* scale, void* tag, float weight)
|
||||
void Bone3D::setAnimationValue(float* trans, float* rot, float* scale, void* tag, float weight)
|
||||
{
|
||||
for (auto& it : _blendStates) {
|
||||
if (it.tag == tag)
|
||||
|
@ -124,7 +124,7 @@ void Bone::setAnimationValue(float* trans, float* rot, float* scale, void* tag,
|
|||
_blendStates.push_back(state);
|
||||
}
|
||||
|
||||
void Bone::clearBoneBlendState()
|
||||
void Bone3D::clearBoneBlendState()
|
||||
{
|
||||
_blendStates.clear();
|
||||
for (auto it : _children) {
|
||||
|
@ -135,14 +135,14 @@ void Bone::clearBoneBlendState()
|
|||
/**
|
||||
* Creates C3DBone.
|
||||
*/
|
||||
Bone* Bone::create(const std::string& id)
|
||||
Bone3D* Bone3D::create(const std::string& id)
|
||||
{
|
||||
auto bone = new Bone(id);
|
||||
auto bone = new Bone3D(id);
|
||||
bone->autorelease();
|
||||
return bone;
|
||||
}
|
||||
|
||||
void Bone::updateJointMatrix(Vec4* matrixPalette)
|
||||
void Bone3D::updateJointMatrix(Vec4* matrixPalette)
|
||||
{
|
||||
{
|
||||
static Mat4 t;
|
||||
|
@ -154,37 +154,37 @@ void Bone::updateJointMatrix(Vec4* matrixPalette)
|
|||
}
|
||||
}
|
||||
|
||||
Bone* Bone::getParentBone()
|
||||
Bone3D* Bone3D::getParentBone()
|
||||
{
|
||||
return _parent;
|
||||
}
|
||||
ssize_t Bone::getChildBoneCount() const
|
||||
ssize_t Bone3D::getChildBoneCount() const
|
||||
{
|
||||
return _children.size();
|
||||
}
|
||||
Bone* Bone::getChildBoneByIndex(int index)
|
||||
Bone3D* Bone3D::getChildBoneByIndex(int index)
|
||||
{
|
||||
return _children.at(index);
|
||||
}
|
||||
void Bone::addChildBone(Bone* bone)
|
||||
void Bone3D::addChildBone(Bone3D* bone)
|
||||
{
|
||||
if (_children.find(bone) == _children.end())
|
||||
_children.pushBack(bone);
|
||||
}
|
||||
void Bone::removeChildBoneByIndex(int index)
|
||||
void Bone3D::removeChildBoneByIndex(int index)
|
||||
{
|
||||
_children.erase(index);
|
||||
}
|
||||
void Bone::removeChildBone(Bone* bone)
|
||||
void Bone3D::removeChildBone(Bone3D* bone)
|
||||
{
|
||||
_children.eraseObject(bone);
|
||||
}
|
||||
void Bone::removeAllChildBone()
|
||||
void Bone3D::removeAllChildBone()
|
||||
{
|
||||
_children.clear();
|
||||
}
|
||||
|
||||
Bone::Bone(const std::string& id)
|
||||
Bone3D::Bone3D(const std::string& id)
|
||||
: _name(id)
|
||||
, _parent(nullptr)
|
||||
, _worldDirty(true)
|
||||
|
@ -192,12 +192,12 @@ Bone::Bone(const std::string& id)
|
|||
|
||||
}
|
||||
|
||||
Bone::~Bone()
|
||||
Bone3D::~Bone3D()
|
||||
{
|
||||
removeAllChildBone();
|
||||
}
|
||||
|
||||
void Bone::updateLocalMat()
|
||||
void Bone3D::updateLocalMat()
|
||||
{
|
||||
if (_blendStates.size())
|
||||
{
|
||||
|
@ -299,13 +299,13 @@ bool MeshSkin::initFromSkinData(const SkinData& skindata)
|
|||
{
|
||||
ssize_t i = 0;
|
||||
for (; i < skindata.skinBoneNames.size(); i++) {
|
||||
auto bone = Bone::create(skindata.skinBoneNames[i]);
|
||||
auto bone = Bone3D::create(skindata.skinBoneNames[i]);
|
||||
bone->_invBindPose = skindata.inverseBindPoseMatrices[i];
|
||||
bone->setOriPose(skindata.skinBoneOriginMatrices[i]);
|
||||
addSkinBone(bone);
|
||||
}
|
||||
for (i = 0; i < skindata.nodeBoneNames.size(); i++) {
|
||||
auto bone = Bone::create(skindata.nodeBoneNames[i]);
|
||||
auto bone = Bone3D::create(skindata.nodeBoneNames[i]);
|
||||
bone->setOriPose(skindata.nodeBoneOriginMatrices[i]);
|
||||
addNodeBone(bone);
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ ssize_t MeshSkin::getBoneCount() const
|
|||
}
|
||||
|
||||
//get bone
|
||||
Bone* MeshSkin::getBoneByIndex(unsigned int index) const
|
||||
Bone3D* MeshSkin::getBoneByIndex(unsigned int index) const
|
||||
{
|
||||
if (index < _skinBones.size())
|
||||
return _skinBones.at(index);
|
||||
|
@ -340,7 +340,7 @@ Bone* MeshSkin::getBoneByIndex(unsigned int index) const
|
|||
|
||||
return nullptr;
|
||||
}
|
||||
Bone* MeshSkin::getBoneByName(const std::string& id) const
|
||||
Bone3D* MeshSkin::getBoneByName(const std::string& id) const
|
||||
{
|
||||
//search from skin bones
|
||||
for (auto it : _skinBones) {
|
||||
|
@ -355,18 +355,18 @@ Bone* MeshSkin::getBoneByName(const std::string& id) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
Bone* MeshSkin::getRootBone() const
|
||||
Bone3D* MeshSkin::getRootBone() const
|
||||
{
|
||||
return _rootBone;
|
||||
}
|
||||
void MeshSkin::setRootBone(Bone* joint)
|
||||
void MeshSkin::setRootBone(Bone3D* joint)
|
||||
{
|
||||
CC_SAFE_RETAIN(joint);
|
||||
CC_SAFE_RELEASE(_rootBone);
|
||||
_rootBone = joint;
|
||||
}
|
||||
|
||||
int MeshSkin::getBoneIndex(Bone* bone) const
|
||||
int MeshSkin::getBoneIndex(Bone3D* bone) const
|
||||
{
|
||||
int i = 0;
|
||||
for (; i < _skinBones.size(); i++) {
|
||||
|
@ -419,12 +419,12 @@ void MeshSkin::removeAllBones()
|
|||
CC_SAFE_RELEASE(_rootBone);
|
||||
}
|
||||
|
||||
void MeshSkin::addSkinBone(Bone* bone)
|
||||
void MeshSkin::addSkinBone(Bone3D* bone)
|
||||
{
|
||||
_skinBones.pushBack(bone);
|
||||
}
|
||||
|
||||
void MeshSkin::addNodeBone(Bone* bone)
|
||||
void MeshSkin::addNodeBone(Bone3D* bone)
|
||||
{
|
||||
_nodeBones.pushBack(bone);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ NS_CC_BEGIN
|
|||
/**
|
||||
* Defines a basic hierachial structure of transformation spaces.
|
||||
*/
|
||||
class Bone : public Ref
|
||||
class Bone3D : public Ref
|
||||
{
|
||||
friend class MeshSkin;
|
||||
public:
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
/**
|
||||
* Creates C3DBone.
|
||||
*/
|
||||
static Bone* create(const std::string& id);
|
||||
static Bone3D* create(const std::string& id);
|
||||
|
||||
/**
|
||||
* Sets the inverse bind pose matrix.
|
||||
|
@ -105,17 +105,17 @@ public:
|
|||
void updateJointMatrix(Vec4* matrixPalette);
|
||||
|
||||
/**bone tree, we do not inherit from Node, Node has too many properties that we do not need. A clean Node is needed.*/
|
||||
Bone* getParentBone();
|
||||
Bone3D* getParentBone();
|
||||
/**get child bone count*/
|
||||
ssize_t getChildBoneCount() const;
|
||||
/**get child bone by index*/
|
||||
Bone* getChildBoneByIndex(int index);
|
||||
Bone3D* getChildBoneByIndex(int index);
|
||||
/**add child bone*/
|
||||
void addChildBone(Bone* bone);
|
||||
void addChildBone(Bone3D* bone);
|
||||
/**remove child bone by index*/
|
||||
void removeChildBoneByIndex(int index);
|
||||
/**remove child bone*/
|
||||
void removeChildBone(Bone* bone);
|
||||
void removeChildBone(Bone3D* bone);
|
||||
/**remove all child bone*/
|
||||
void removeAllChildBone();
|
||||
|
||||
|
@ -143,12 +143,12 @@ protected:
|
|||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
Bone(const std::string& id);
|
||||
Bone3D(const std::string& id);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~Bone();
|
||||
virtual ~Bone3D();
|
||||
|
||||
/**
|
||||
* Update local matrix
|
||||
|
@ -166,9 +166,9 @@ protected:
|
|||
|
||||
Mat4 _oriPose; //original bone pose
|
||||
|
||||
Bone* _parent; //parent bone
|
||||
Bone3D* _parent; //parent bone
|
||||
|
||||
Vector<Bone*> _children;
|
||||
Vector<Bone3D*> _children;
|
||||
|
||||
bool _worldDirty;
|
||||
Mat4 _world;
|
||||
|
@ -193,15 +193,15 @@ public:
|
|||
ssize_t getBoneCount() const;
|
||||
|
||||
/**get bone*/
|
||||
Bone* getBoneByIndex(unsigned int index) const;
|
||||
Bone* getBoneByName(const std::string& id) const;
|
||||
Bone3D* getBoneByIndex(unsigned int index) const;
|
||||
Bone3D* getBoneByName(const std::string& id) const;
|
||||
|
||||
/**get & set root bone*/
|
||||
Bone* getRootBone() const;
|
||||
void setRootBone(Bone* bone);
|
||||
Bone3D* getRootBone() const;
|
||||
void setRootBone(Bone3D* bone);
|
||||
|
||||
/**get bone index*/
|
||||
int getBoneIndex(Bone* bone) const;
|
||||
int getBoneIndex(Bone3D* bone) const;
|
||||
|
||||
/**compute matrix palette used by gpu skin*/
|
||||
Vec4* getMatrixPalette();
|
||||
|
@ -225,17 +225,17 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
void removeAllBones();
|
||||
|
||||
/**add skin bone*/
|
||||
void addSkinBone(Bone* bone);
|
||||
void addSkinBone(Bone3D* bone);
|
||||
|
||||
/**add Node bone*/
|
||||
void addNodeBone(Bone* bone);
|
||||
void addNodeBone(Bone3D* bone);
|
||||
|
||||
protected:
|
||||
|
||||
Vector<Bone*> _skinBones; // bones with skin
|
||||
Vector<Bone*> _nodeBones; //bones without skin, only used to compute transform of children
|
||||
Vector<Bone3D*> _skinBones; // bones with skin
|
||||
Vector<Bone3D*> _nodeBones; //bones without skin, only used to compute transform of children
|
||||
|
||||
Bone* _rootBone;
|
||||
Bone3D* _rootBone;
|
||||
|
||||
// Pointer to the array of palette matrices.
|
||||
// This array is passed to the vertex shader as a uniform.
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module VideoPlayer
|
||||
-- @extend Widget
|
||||
-- @parent_module ccexprimental
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] getFileName
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] getURL
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] play
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] pause
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] setKeepAspectRatioEnabled
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] resume
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] stop
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] setFullScreenEnabled
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] setFileName
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] setURL
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] isKeepAspectRatioEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] onPlayEvent
|
||||
-- @param self
|
||||
-- @param #cc.experimental::ui::VideoPlayer::EventType eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] isFullScreenEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] isPlaying
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] seekTo
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] create
|
||||
-- @param self
|
||||
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer ret (return value: cc.experimental::ui::VideoPlayer)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #mat4_table mat4
|
||||
-- @param #unsigned int int
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#VideoPlayer] setVisible
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
return nil
|
|
@ -0,0 +1,9 @@
|
|||
--------------------------------
|
||||
-- @module ccexprimental
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the ccexprimental VideoPlayer
|
||||
-- @field [parent=#ccexprimental] VideoPlayer#VideoPlayer VideoPlayer preloaded module
|
||||
|
||||
|
||||
return nil
|
|
@ -1,3 +1,4 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_h__
|
||||
#define __cocos2dx_h__
|
||||
|
||||
|
@ -1572,6 +1573,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_h__
|
||||
|
|
|
@ -0,0 +1,755 @@
|
|||
#include "lua_cocos2dx_experimental_video_auto.hpp"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#include "UIVideoPlayer.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
||||
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_getFileName(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_getFileName'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
const std::string& ret = cobj->getFileName();
|
||||
tolua_pushcppstring(tolua_S,ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getFileName",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_getFileName'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_getURL(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_getURL'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
const std::string& ret = cobj->getURL();
|
||||
tolua_pushcppstring(tolua_S,ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getURL",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_getURL'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_play(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_play'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->play();
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "play",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_play'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_pause(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_pause'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->pause();
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "pause",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_pause'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_setKeepAspectRatioEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_setKeepAspectRatioEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->setKeepAspectRatioEnabled(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setKeepAspectRatioEnabled",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_setKeepAspectRatioEnabled'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_resume(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_resume'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->resume();
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "resume",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_resume'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_stop(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_stop'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->stop();
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "stop",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_stop'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_setFullScreenEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_setFullScreenEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->setFullScreenEnabled(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setFullScreenEnabled",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_setFullScreenEnabled'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_setFileName(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_setFileName'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->setFileName(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setFileName",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_setFileName'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_setURL(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_setURL'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->setURL(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setURL",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_setURL'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_isKeepAspectRatioEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_isKeepAspectRatioEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
bool ret = cobj->isKeepAspectRatioEnabled();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isKeepAspectRatioEnabled",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_isKeepAspectRatioEnabled'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_onPlayEvent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_onPlayEvent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::experimental::ui::VideoPlayer::EventType arg0;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->onPlayEvent(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "onPlayEvent",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_onPlayEvent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_isFullScreenEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_isFullScreenEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
bool ret = cobj->isFullScreenEnabled();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isFullScreenEnabled",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_isFullScreenEnabled'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_isPlaying(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_isPlaying'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
bool ret = cobj->isPlaying();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isPlaying",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_isPlaying'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_seekTo(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::VideoPlayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_video_VideoPlayer_seekTo'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
double arg0;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->seekTo(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "seekTo",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_seekTo'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_video_VideoPlayer_create(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,"ccexp.VideoPlayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
cocos2d::experimental::ui::VideoPlayer* ret = cocos2d::experimental::ui::VideoPlayer::create();
|
||||
object_to_luaval<cocos2d::experimental::ui::VideoPlayer>(tolua_S, "ccexp.VideoPlayer",(cocos2d::experimental::ui::VideoPlayer*)ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "create",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_video_VideoPlayer_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_experimental_video_VideoPlayer_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (VideoPlayer)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_experimental_video_VideoPlayer(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccexp.VideoPlayer");
|
||||
tolua_cclass(tolua_S,"VideoPlayer","ccexp.VideoPlayer","ccui.Widget",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"VideoPlayer");
|
||||
tolua_function(tolua_S,"getFileName",lua_cocos2dx_experimental_video_VideoPlayer_getFileName);
|
||||
tolua_function(tolua_S,"getURL",lua_cocos2dx_experimental_video_VideoPlayer_getURL);
|
||||
tolua_function(tolua_S,"play",lua_cocos2dx_experimental_video_VideoPlayer_play);
|
||||
tolua_function(tolua_S,"pause",lua_cocos2dx_experimental_video_VideoPlayer_pause);
|
||||
tolua_function(tolua_S,"setKeepAspectRatioEnabled",lua_cocos2dx_experimental_video_VideoPlayer_setKeepAspectRatioEnabled);
|
||||
tolua_function(tolua_S,"resume",lua_cocos2dx_experimental_video_VideoPlayer_resume);
|
||||
tolua_function(tolua_S,"stop",lua_cocos2dx_experimental_video_VideoPlayer_stop);
|
||||
tolua_function(tolua_S,"setFullScreenEnabled",lua_cocos2dx_experimental_video_VideoPlayer_setFullScreenEnabled);
|
||||
tolua_function(tolua_S,"setFileName",lua_cocos2dx_experimental_video_VideoPlayer_setFileName);
|
||||
tolua_function(tolua_S,"setURL",lua_cocos2dx_experimental_video_VideoPlayer_setURL);
|
||||
tolua_function(tolua_S,"isKeepAspectRatioEnabled",lua_cocos2dx_experimental_video_VideoPlayer_isKeepAspectRatioEnabled);
|
||||
tolua_function(tolua_S,"onPlayEvent",lua_cocos2dx_experimental_video_VideoPlayer_onPlayEvent);
|
||||
tolua_function(tolua_S,"isFullScreenEnabled",lua_cocos2dx_experimental_video_VideoPlayer_isFullScreenEnabled);
|
||||
tolua_function(tolua_S,"isPlaying",lua_cocos2dx_experimental_video_VideoPlayer_isPlaying);
|
||||
tolua_function(tolua_S,"seekTo",lua_cocos2dx_experimental_video_VideoPlayer_seekTo);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_experimental_video_VideoPlayer_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::experimental::ui::VideoPlayer).name();
|
||||
g_luaType[typeName] = "ccexp.VideoPlayer";
|
||||
g_typeCast["VideoPlayer"] = "ccexp.VideoPlayer";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_experimental_video(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
||||
tolua_module(tolua_S,"ccexprimental",0);
|
||||
tolua_beginmodule(tolua_S,"ccexprimental");
|
||||
|
||||
lua_register_cocos2dx_experimental_video_VideoPlayer(tolua_S);
|
||||
|
||||
tolua_endmodule(tolua_S);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,34 @@
|
|||
#include "base/ccConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#ifndef __cocos2dx_experimental_video_h__
|
||||
#define __cocos2dx_experimental_video_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_experimental_video(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_experimental_video_h__
|
||||
#endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
|
@ -1,3 +1,4 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_extension_h__
|
||||
#define __cocos2dx_extension_h__
|
||||
|
||||
|
@ -364,6 +365,7 @@ int register_all_cocos2dx_extension(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_extension_h__
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "lua_cocos2dx_physics_auto.hpp"
|
||||
#if CC_USE_PHYSICS
|
||||
#include "cocos2d.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
@ -10943,3 +10944,4 @@ TOLUA_API int register_all_cocos2dx_physics(lua_State* tolua_S)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "base/ccConfig.h"
|
||||
#if CC_USE_PHYSICS
|
||||
#ifndef __cocos2dx_physics_h__
|
||||
#define __cocos2dx_physics_h__
|
||||
|
||||
|
@ -258,6 +260,8 @@ int register_all_cocos2dx_physics(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_physics_h__
|
||||
#endif //#if CC_USE_PHYSICS
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_spine_h__
|
||||
#define __cocos2dx_spine_h__
|
||||
|
||||
|
@ -23,4 +24,5 @@ int register_all_cocos2dx_spine(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_spine_h__
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_studio_h__
|
||||
#define __cocos2dx_studio_h__
|
||||
|
||||
|
@ -490,6 +491,7 @@ int register_all_cocos2dx_studio(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_studio_h__
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_ui_h__
|
||||
#define __cocos2dx_ui_h__
|
||||
|
||||
|
@ -394,6 +395,7 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_ui_h__
|
||||
|
|
|
@ -3930,6 +3930,7 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/Twirl.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/UserDefault.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/VBox.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Waves.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Waves3D.lua",
|
||||
|
@ -3937,6 +3938,7 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/Widget.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_experimental_video_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua",
|
||||
|
@ -3944,6 +3946,8 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_video_auto.cpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_video_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp",
|
||||
|
|
Loading…
Reference in New Issue