This commit is contained in:
XiaoFeng 2015-12-07 10:27:38 +08:00
commit 0328c31596
80 changed files with 3367 additions and 4024 deletions

View File

@ -82,7 +82,7 @@ AnimationFrame* AnimationFrame::clone() const
// implementation of Animation
Animation* Animation::create(void)
Animation* Animation::create()
{
Animation *animation = new (std::nothrow) Animation();
animation->init();

View File

@ -481,4 +481,9 @@ void Camera::setBackgroundBrush(CameraBackgroundBrush* clearBrush)
_clearBrush = clearBrush;
}
bool Camera::isBrushValid()
{
return _clearBrush != nullptr && _clearBrush->isValid();
}
NS_CC_END

View File

@ -271,7 +271,9 @@ public:
CameraBackgroundBrush* getBackgroundBrush() const { return _clearBrush; }
virtual void visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
bool isBrushValid();
CC_CONSTRUCTOR_ACCESS:
Camera();
~Camera();

View File

@ -232,6 +232,8 @@ CameraBackgroundSkyBoxBrush::CameraBackgroundSkyBoxBrush()
, _vertexBuffer(0)
, _indexBuffer(0)
, _texture(nullptr)
, _actived(false)
, _textureValid(false)
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
_backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED,
@ -296,6 +298,9 @@ CameraBackgroundSkyBoxBrush* CameraBackgroundSkyBoxBrush::create()
void CameraBackgroundSkyBoxBrush::drawBackground(Camera* camera)
{
if (!_actived)
return;
Mat4 cameraModelMat = camera->getNodeToWorldTransform();
Vec4 color(1.f, 1.f, 1.f, 1.f);
@ -427,4 +432,23 @@ void CameraBackgroundSkyBoxBrush::setTexture(TextureCube* texture)
_glProgramState->setUniformTexture("u_Env", _texture);
}
bool CameraBackgroundSkyBoxBrush::isActived() const
{
return _actived;
}
void CameraBackgroundSkyBoxBrush::setActived(bool actived)
{
_actived = actived;
}
void CameraBackgroundSkyBoxBrush::setTextureValid(bool valid)
{
_textureValid = valid;
}
bool CameraBackgroundSkyBoxBrush::isValid()
{
return _actived;
}
NS_CC_END

View File

@ -103,8 +103,10 @@ public:
* draw the background
*/
virtual void drawBackground(Camera* camera) {}
CC_CONSTRUCTOR_ACCESS:
virtual bool isValid() { return true; }
CC_CONSTRUCTOR_ACCESS :
CameraBackgroundBrush();
virtual ~CameraBackgroundBrush();
@ -236,8 +238,13 @@ public:
* Draw background
*/
virtual void drawBackground(Camera* camera) override;
CC_CONSTRUCTOR_ACCESS:
bool isActived() const;
void setActived(bool actived);
virtual void setTextureValid(bool valid);
virtual bool isValid()override;
CC_CONSTRUCTOR_ACCESS :
CameraBackgroundSkyBoxBrush();
virtual ~CameraBackgroundSkyBoxBrush();
@ -258,6 +265,10 @@ protected:
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
EventListenerCustom* _backToForegroundListener;
#endif
private:
bool _actived;
bool _textureValid;
};
NS_CC_END

View File

@ -104,9 +104,7 @@ static inline Tex2F __t(const Vec2 &v)
// implementation of DrawNode
static const int DEFAULT_LINE_WIDTH = 2;
DrawNode::DrawNode()
DrawNode::DrawNode(int lineWidth)
: _vao(0)
, _vbo(0)
, _vaoGLPoint(0)
@ -125,7 +123,8 @@ DrawNode::DrawNode()
, _dirty(false)
, _dirtyGLPoint(false)
, _dirtyGLLine(false)
, _lineWidth(DEFAULT_LINE_WIDTH)
, _lineWidth(lineWidth)
, _defaultLineWidth(lineWidth)
{
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
}
@ -156,9 +155,9 @@ DrawNode::~DrawNode()
}
}
DrawNode* DrawNode::create()
DrawNode* DrawNode::create(int defaultLineWidth)
{
DrawNode* ret = new (std::nothrow) DrawNode();
DrawNode* ret = new (std::nothrow) DrawNode(defaultLineWidth);
if (ret && ret->init())
{
ret->autorelease();
@ -398,6 +397,7 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t flags)
// texcood
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
}
glLineWidth(_lineWidth);
glDrawArrays(GL_LINES, 0, _bufferCountGLLine);
@ -407,8 +407,8 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t flags)
}
glBindBuffer(GL_ARRAY_BUFFER, 0);
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_bufferCountGLLine);
CHECK_GL_ERROR_DEBUG();
}
@ -928,7 +928,7 @@ void DrawNode::clear()
_dirtyGLLine = true;
_bufferCountGLPoint = 0;
_dirtyGLPoint = true;
_lineWidth = DEFAULT_LINE_WIDTH;
_lineWidth = _defaultLineWidth;
}
const BlendFunc& DrawNode::getBlendFunc() const
@ -946,4 +946,9 @@ void DrawNode::setLineWidth(int lineWidth)
_lineWidth = lineWidth;
}
float DrawNode::getLineWidth()
{
return this->_lineWidth;
}
NS_CC_END

View File

@ -38,6 +38,8 @@
NS_CC_BEGIN
static const int DEFAULT_LINE_WIDTH = 2;
class PointArray;
/**
* @addtogroup _2d
@ -56,7 +58,7 @@ public:
*
* @return Return an autorelease object.
*/
static DrawNode* create();
static DrawNode* create(int defaultLineWidth = DEFAULT_LINE_WIDTH);
/** Draw a point.
*
@ -298,23 +300,26 @@ public:
/**
* @js NA
*/
void onDraw(const Mat4 &transform, uint32_t flags);
virtual void onDraw(const Mat4 &transform, uint32_t flags);
/**
* @js NA
*/
void onDrawGLLine(const Mat4 &transform, uint32_t flags);
virtual void onDrawGLLine(const Mat4 &transform, uint32_t flags);
/**
* @js NA
*/
void onDrawGLPoint(const Mat4 &transform, uint32_t flags);
virtual void onDrawGLPoint(const Mat4 &transform, uint32_t flags);
// Overrides
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
void setLineWidth(int lineWidth);
// Get CocosStudio guide lines width.
float getLineWidth();
CC_CONSTRUCTOR_ACCESS:
DrawNode();
DrawNode(int lineWidth = DEFAULT_LINE_WIDTH);
virtual ~DrawNode();
virtual bool init() override;
@ -355,6 +360,7 @@ protected:
int _lineWidth;
int _defaultLineWidth;
private:
CC_DISALLOW_COPY_AND_ASSIGN(DrawNode);
};

View File

@ -238,4 +238,42 @@ bool FontAtlasCache::releaseFontAtlas(FontAtlas *atlas)
return false;
}
void FontAtlasCache::reloadFontAtlasFNT(const std::string& fontFileName, const Vec2& imageOffset/* = Vec2::ZERO*/)
{
std::string atlasName = generateFontName(fontFileName, 0, false);
auto it = _atlasMap.find(atlasName);
if (it != _atlasMap.end())
{
CC_SAFE_RELEASE_NULL(it->second);
_atlasMap.erase(it);
}
FontFNT::reloadBMFontResource(fontFileName);
auto font = FontFNT::create(fontFileName, imageOffset);
if (font)
{
auto tempAtlas = font->createFontAtlas();
if (tempAtlas)
{
_atlasMap[atlasName] = tempAtlas;
}
}
}
void FontAtlasCache::unloadFontAtlasTTF(const std::string& fontFileName)
{
auto item = _atlasMap.begin();
while (item != _atlasMap.end())
{
if (item->first.find(fontFileName) >= 0)
{
CC_SAFE_RELEASE_NULL(item->second);
item = _atlasMap.erase(item);
}
else
item++;
}
}
NS_CC_END

View File

@ -53,7 +53,19 @@ public:
It will purge the textures atlas and if multiple texture exist in one FontAtlas.
*/
static void purgeCachedData();
/** Release current FNT texutre and reload it.
CAUTION : All component use this font texture should be reset font name, though the file name is same!
otherwise, it will cause program crash!
*/
static void reloadFontAtlasFNT(const std::string& fontFileName, const Vec2& imageOffset = Vec2::ZERO);
/** Unload all texture atlas texture create by special file name.
CAUTION : All component use this font texture should be reset font name, though the file name is same!
otherwise, it will cause program crash!
*/
static void unloadFontAtlasTTF(const std::string& fontFileName);
private:
static std::string generateFontName(const std::string& fontFileName, float size, bool useDistanceField);
static std::unordered_map<std::string, FontAtlas *> _atlasMap;

View File

@ -805,5 +805,25 @@ FontAtlas * FontFNT::createFontAtlas()
return tempAtlas;
}
void FontFNT::reloadBMFontResource(const std::string& fntFilePath)
{
if (s_configurations == nullptr)
{
s_configurations = new (std::nothrow) Map<std::string, BMFontConfiguration*>();
}
BMFontConfiguration *ret = s_configurations->at(fntFilePath);
if (ret != nullptr)
{
s_configurations->erase(fntFilePath);
}
ret = BMFontConfiguration::create(fntFilePath.c_str());
if (ret)
{
s_configurations->insert(fntFilePath, ret);
TextureCache::getInstance()->reloadTexture(ret->getAtlasName());
}
}
NS_CC_END

View File

@ -48,6 +48,9 @@ public:
virtual FontAtlas *createFontAtlas() override;
void setFontSize(float fontSize);
int getOriginalFontSize()const;
static void reloadBMFontResource(const std::string& fntFilePath);
protected:
FontFNT(BMFontConfiguration *theContfig, const Vec2& imageOffset = Vec2::ZERO);

View File

@ -634,4 +634,16 @@ const char* FontFreeType::getGlyphCollection() const
return glyphCollection;
}
void FontFreeType::releaseFont(const std::string &fontName)
{
auto item = s_cacheFontData.begin();
while (s_cacheFontData.end() != item)
{
if (item->first.find(fontName) >= 0)
item = s_cacheFontData.erase(item);
else
item++;
}
}
NS_CC_END

View File

@ -74,6 +74,9 @@ public:
virtual FontAtlas* createFontAtlas() override;
virtual int getFontMaxHeight() const override { return _lineHeight; }
static void releaseFont(const std::string &fontName);
private:
static const char* _glyphASCII;
static const char* _glyphNEHE;

View File

@ -1332,5 +1332,4 @@ void ParticleSystem::setScaleY(float newScaleY)
Node::setScaleY(newScaleY);
}
NS_CC_END

View File

@ -760,7 +760,9 @@ public:
* @lua NA
*/
virtual const BlendFunc &getBlendFunc() const override;
const std::string getResourceFile() const { return _plistFile; }
CC_CONSTRUCTOR_ACCESS:
/**
* @js ctor

View File

@ -109,7 +109,7 @@ public:
* @param renderer The renderer use to render the scene.
* @js NA
*/
void render(Renderer* renderer);
virtual void render(Renderer* renderer);
/** override function */
virtual void removeAllChildren() override;

View File

@ -164,7 +164,14 @@ bool Sprite::initWithTexture(Texture2D *texture, const Rect& rect)
bool Sprite::initWithFile(const std::string& filename)
{
CCASSERT(filename.size()>0, "Invalid filename for sprite");
if (filename.empty())
{
CCLOG("Call Sprite::initWithFile with blank resource filename.");
return false;
}
_fileName = filename;
_fileType = 0;
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename);
if (texture)
@ -184,6 +191,9 @@ bool Sprite::initWithFile(const std::string &filename, const Rect& rect)
{
CCASSERT(filename.size()>0, "Invalid filename");
_fileName = filename;
_fileType = 0;
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename);
if (texture)
{
@ -200,6 +210,9 @@ bool Sprite::initWithSpriteFrameName(const std::string& spriteFrameName)
{
CCASSERT(spriteFrameName.size() > 0, "Invalid spriteFrameName");
_fileName = spriteFrameName;
_fileType = 1;
SpriteFrame *frame = SpriteFrameCache::getInstance()->getSpriteFrameByName(spriteFrameName);
return initWithSpriteFrame(frame);
}
@ -329,7 +342,7 @@ void Sprite::setTexture(const std::string &filename)
{
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename);
setTexture(texture);
_unflippedOffsetPositionFromCenter = Vec2::ZERO;
Rect rect = Rect::ZERO;
if (texture)
rect.size = texture->getContentSize();

View File

@ -474,7 +474,10 @@ public:
virtual bool isOpacityModifyRGB() const override;
/// @}
CC_CONSTRUCTOR_ACCESS:
const int getResourceType() const { return _fileType; }
const std::string getResourceName() const { return _fileName; }
CC_CONSTRUCTOR_ACCESS :
/**
* @js ctor
*/
@ -633,6 +636,10 @@ protected:
bool _flippedY; /// Whether the sprite is flipped vertically or not
bool _insideBounds; /// whether or not the sprite was inside bounds the previous frame
std::string _fileName;
int _fileType;
private:
CC_DISALLOW_COPY_AND_ASSIGN(Sprite);
};

View File

@ -150,7 +150,9 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu
Version 3 with TexturePacker 4.0 polygon mesh packing
*/
if (dictionary["frames"].getType() != cocos2d::Value::Type::MAP)
return;
ValueMap& framesDict = dictionary["frames"].asValueMap();
int format = 0;
@ -493,6 +495,9 @@ void SpriteFrameCache::removeSpriteFramesFromFileContent(const std::string& plis
void SpriteFrameCache::removeSpriteFramesFromDictionary(ValueMap& dictionary)
{
if (dictionary["frames"].getType() != cocos2d::Value::Type::MAP)
return;
ValueMap framesDict = dictionary["frames"].asValueMap();
std::vector<std::string> keysToRemove;
@ -543,4 +548,175 @@ SpriteFrame* SpriteFrameCache::getSpriteFrameByName(const std::string& name)
return frame;
}
void SpriteFrameCache::reloadSpriteFramesWithDictionary(ValueMap& dictionary, Texture2D *texture)
{
ValueMap& framesDict = dictionary["frames"].asValueMap();
int format = 0;
// get the format
if (dictionary.find("metadata") != dictionary.end())
{
ValueMap& metadataDict = dictionary["metadata"].asValueMap();
format = metadataDict["format"].asInt();
}
// check the format
CCASSERT(format >= 0 && format <= 3, "format is not supported for SpriteFrameCache addSpriteFramesWithDictionary:textureFilename:");
for (auto iter = framesDict.begin(); iter != framesDict.end(); ++iter)
{
ValueMap& frameDict = iter->second.asValueMap();
std::string spriteFrameName = iter->first;
auto it = _spriteFrames.find(spriteFrameName);
if (it != _spriteFrames.end())
{
_spriteFrames.erase(it);
}
SpriteFrame* spriteFrame = nullptr;
if (format == 0)
{
float x = frameDict["x"].asFloat();
float y = frameDict["y"].asFloat();
float w = frameDict["width"].asFloat();
float h = frameDict["height"].asFloat();
float ox = frameDict["offsetX"].asFloat();
float oy = frameDict["offsetY"].asFloat();
int ow = frameDict["originalWidth"].asInt();
int oh = frameDict["originalHeight"].asInt();
// check ow/oh
if (!ow || !oh)
{
CCLOGWARN("cocos2d: WARNING: originalWidth/Height not found on the SpriteFrame. AnchorPoint won't work as expected. Regenrate the .plist");
}
// abs ow/oh
ow = abs(ow);
oh = abs(oh);
// create frame
spriteFrame = SpriteFrame::createWithTexture(texture,
Rect(x, y, w, h),
false,
Vec2(ox, oy),
Size((float)ow, (float)oh)
);
}
else if (format == 1 || format == 2)
{
Rect frame = RectFromString(frameDict["frame"].asString());
bool rotated = false;
// rotation
if (format == 2)
{
rotated = frameDict["rotated"].asBool();
}
Vec2 offset = PointFromString(frameDict["offset"].asString());
Size sourceSize = SizeFromString(frameDict["sourceSize"].asString());
// create frame
spriteFrame = SpriteFrame::createWithTexture(texture,
frame,
rotated,
offset,
sourceSize
);
}
else if (format == 3)
{
// get values
Size spriteSize = SizeFromString(frameDict["spriteSize"].asString());
Vec2 spriteOffset = PointFromString(frameDict["spriteOffset"].asString());
Size spriteSourceSize = SizeFromString(frameDict["spriteSourceSize"].asString());
Rect textureRect = RectFromString(frameDict["textureRect"].asString());
bool textureRotated = frameDict["textureRotated"].asBool();
// get aliases
ValueVector& aliases = frameDict["aliases"].asValueVector();
for (const auto &value : aliases) {
std::string oneAlias = value.asString();
if (_spriteFramesAliases.find(oneAlias) != _spriteFramesAliases.end())
{
CCLOGWARN("cocos2d: WARNING: an alias with name %s already exists", oneAlias.c_str());
}
_spriteFramesAliases[oneAlias] = Value(spriteFrameName);
}
// create frame
spriteFrame = SpriteFrame::createWithTexture(texture,
Rect(textureRect.origin.x, textureRect.origin.y, spriteSize.width, spriteSize.height),
textureRotated,
spriteOffset,
spriteSourceSize);
}
// add sprite frame
_spriteFrames.insert(spriteFrameName, spriteFrame);
}
}
bool SpriteFrameCache::reloadTexture(const std::string& plist)
{
CCASSERT(plist.size()>0, "plist filename should not be nullptr");
auto it = _loadedFileNames->find(plist);
if (it != _loadedFileNames->end()) {
_loadedFileNames->erase(it);
}
else
{
//If one plist has't be loaded, we don't load it here.
return false;
}
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(plist);
ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(fullPath);
string texturePath("");
if (dict.find("metadata") != dict.end())
{
ValueMap& metadataDict = dict["metadata"].asValueMap();
// try to read texture file name from meta data
texturePath = metadataDict["textureFileName"].asString();
}
if (!texturePath.empty())
{
// build texture path relative to plist file
texturePath = FileUtils::getInstance()->fullPathFromRelativeFile(texturePath.c_str(), plist);
}
else
{
// build texture path by replacing file extension
texturePath = plist;
// remove .xxx
size_t startPos = texturePath.find_last_of(".");
texturePath = texturePath.erase(startPos);
// append .png
texturePath = texturePath.append(".png");
}
Texture2D *texture = nullptr;
if (Director::getInstance()->getTextureCache()->reloadTexture(texturePath.c_str()))
texture = Director::getInstance()->getTextureCache()->getTextureForKey(texturePath);
if (texture)
{
reloadSpriteFramesWithDictionary(dict, texture);
_loadedFileNames->insert(plist);
}
else
{
CCLOG("cocos2d: SpriteFrameCache: Couldn't load texture");
}
return true;
}
NS_CC_END

View File

@ -236,6 +236,8 @@ public:
/** @deprecated use getSpriteFrameByName() instead */
CC_DEPRECATED_ATTRIBUTE SpriteFrame* spriteFrameByName(const std::string&name) { return getSpriteFrameByName(name); }
bool reloadTexture(const std::string& plist);
protected:
// MARMALADE: Made this protected not private, as deriving from this class is pretty useful
SpriteFrameCache(){}
@ -260,6 +262,8 @@ protected:
const std::vector<int> &triangleIndices,
PolygonInfo &polygonInfo);
void reloadSpriteFramesWithDictionary(ValueMap& dictionary, Texture2D *texture);
Map<std::string, SpriteFrame*> _spriteFrames;
ValueMap _spriteFramesAliases;
std::set<std::string>* _loadedFileNames;

View File

@ -61,7 +61,9 @@ TMXTiledMap* TMXTiledMap::createWithXML(const std::string& tmxString, const std:
bool TMXTiledMap::initWithTMXFile(const std::string& tmxFile)
{
CCASSERT(tmxFile.size()>0, "TMXTiledMap: tmx file should not be empty");
_tmxFile = tmxFile;
setContentSize(Size::ZERO);
TMXMapInfo *mapInfo = TMXMapInfo::create(tmxFile);
@ -78,6 +80,8 @@ bool TMXTiledMap::initWithTMXFile(const std::string& tmxFile)
bool TMXTiledMap::initWithXML(const std::string& tmxString, const std::string& resourcePath)
{
_tmxFile = tmxString;
setContentSize(Size::ZERO);
TMXMapInfo *mapInfo = TMXMapInfo::createWithXML(tmxString, resourcePath);
@ -91,6 +95,8 @@ bool TMXTiledMap::initWithXML(const std::string& tmxString, const std::string& r
TMXTiledMap::TMXTiledMap()
:_mapSize(Size::ZERO)
,_tileSize(Size::ZERO)
,_tmxFile("")
, _tmxLayerNum(0)
{
}
@ -173,28 +179,30 @@ void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
_tileProperties = mapInfo->getTileProperties();
int idx=0;
int idx = 0;
auto& layers = mapInfo->getLayers();
for(const auto &layerInfo : layers) {
for (const auto &layerInfo : layers) {
if (layerInfo->_visible) {
TMXLayer *child = parseLayer(layerInfo, mapInfo);
if (child == nullptr) {
idx++;
continue;
}
addChild(child, idx, idx);
addChild(child, 0, idx);
child->setOrderOfArrival(idx);
child->setTag(TMXLayerTag);
// update content size with the max size
const Size& childSize = child->getContentSize();
Size currentSize = this->getContentSize();
currentSize.width = std::max( currentSize.width, childSize.width );
currentSize.height = std::max( currentSize.height, childSize.height );
currentSize.width = std::max(currentSize.width, childSize.width);
currentSize.height = std::max(currentSize.height, childSize.height);
this->setContentSize(currentSize);
idx++;
}
}
_tmxLayerNum = idx;
}
// public
@ -270,5 +278,9 @@ std::string TMXTiledMap::getDescription() const
return StringUtils::format("<TMXTiledMap | Tag = %d, Layers = %d", _tag, static_cast<int>(_children.size()));
}
int TMXTiledMap::getLayerNum()
{
return _tmxLayerNum;
}
NS_CC_END

View File

@ -251,7 +251,10 @@ public:
* @js NA
*/
virtual std::string getDescription() const override;
int getLayerNum();
const std::string getResourceFile() const { return _tmxFile; }
CC_CONSTRUCTOR_ACCESS:
/**
* @js ctor
@ -288,6 +291,11 @@ protected:
//! tile properties
ValueMapIntKey _tileProperties;
std::string _tmxFile;
int _tmxLayerNum;
static const int TMXLayerTag = 32768;
private:
CC_DISALLOW_COPY_AND_ASSIGN(TMXTiledMap);

View File

@ -266,6 +266,8 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
std::string externalTilesetFilename = attributeDict["source"].asString();
if (externalTilesetFilename != "")
{
_externalTilesetFilename = externalTilesetFilename;
// Tileset file will be relative to the map file. So we need to convert it to an absolute path
if (_TMXFileName.find_last_of("/") != string::npos)
{
@ -388,6 +390,7 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
// build full path
std::string imagename = attributeDict["source"].asString();
tileset->_originSourceImage = imagename;
if (_TMXFileName.find_last_of("/") != string::npos)
{

View File

@ -139,6 +139,8 @@ public:
std::string _sourceImage;
//! size in pixels of the image
Size _imageSize;
std::string _originSourceImage;
public:
/**
* @js ctor
@ -279,6 +281,7 @@ public:
inline void setCurrentString(const std::string& currentString){ _currentString = currentString; }
inline const std::string& getTMXFileName() const { return _TMXFileName; }
inline void setTMXFileName(const std::string& fileName){ _TMXFileName = fileName; }
inline const std::string& getExternalTilesetFileName() const { return _externalTilesetFilename; }
protected:
void internalInit(const std::string& tmxFileName, const std::string& resourcePath);
@ -318,6 +321,7 @@ protected:
ValueMapIntKey _tileProperties;
int _currentFirstGID;
bool _recordFirstGID;
std::string _externalTilesetFilename;
};
// end of tilemap_parallax_nodes group

View File

@ -457,9 +457,9 @@ void Sprite3D::setMaterial(Material *material, int meshIndex)
if (meshIndex == -1)
{
for (auto mesh: _meshes)
for (size_t i = 0; i < _meshes.size(); i++)
{
mesh->setMaterial(material);
_meshes.at(i)->setMaterial(i == 0 ? material : material->clone());
}
}
else

View File

@ -0,0 +1,13 @@
#include "CocosStudioExtension.h"
NS_CC_BEGIN
NodeExtension::NodeExtension()
{
}
NodeExtension::~NodeExtension()
{
}
NS_CC_END

View File

@ -437,7 +437,7 @@ public:
protected:
GLProgramState();
~GLProgramState();
virtual ~GLProgramState();
bool init(GLProgram* program);
void resetGLProgram();
void updateUniformsAndAttributes();

View File

@ -4903,32 +4903,6 @@ getElapsed : function (
*/
cc.Sequence = {
/**
* @method init
* @param {Array} arg0
* @return {bool}
*/
init : function (
array
)
{
return false;
},
/**
* @method initWithTwoActions
* @param {cc.FiniteTimeAction} arg0
* @param {cc.FiniteTimeAction} arg1
* @return {bool}
*/
initWithTwoActions : function (
finitetimeaction,
finitetimeaction
)
{
return false;
},
/**
* @method Sequence
* @constructor
@ -5069,32 +5043,6 @@ RepeatForever : function (
*/
cc.Spawn = {
/**
* @method init
* @param {Array} arg0
* @return {bool}
*/
init : function (
array
)
{
return false;
},
/**
* @method initWithTwoActions
* @param {cc.FiniteTimeAction} arg0
* @param {cc.FiniteTimeAction} arg1
* @return {bool}
*/
initWithTwoActions : function (
finitetimeaction,
finitetimeaction
)
{
return false;
},
/**
* @method Spawn
* @constructor
@ -11911,6 +11859,16 @@ color4f
{
},
/**
* @method getLineWidth
* @return {float}
*/
getLineWidth : function (
)
{
return 0;
},
/**
* @method drawPoint
* @param {vec2_object} arg0
@ -15223,6 +15181,16 @@ getStartSpin : function (
return 0;
},
/**
* @method getResourceFile
* @return {String}
*/
getResourceFile : function (
)
{
return ;
},
/**
* @method getRotatePerSecond
* @return {float}
@ -16805,6 +16773,16 @@ float
{
},
/**
* @method getResourceType
* @return {int}
*/
getResourceType : function (
)
{
return 0;
},
/**
* @method initWithTexture
* @param {cc.Texture2D|cc.Texture2D|cc.Texture2D} texture2d
@ -16951,6 +16929,16 @@ getSpriteFrame : function (
return cc.SpriteFrame;
},
/**
* @method getResourceName
* @return {String}
*/
getResourceName : function (
)
{
return ;
},
/**
* @method isDirty
* @return {bool}
@ -18798,6 +18786,16 @@ getProjectionMatrix : function (
return cc.Mat4;
},
/**
* @method isBrushValid
* @return {bool}
*/
isBrushValid : function (
)
{
return false;
},
/**
* @method getDepthInView
* @param {mat4_object} arg0
@ -19158,6 +19156,16 @@ init : function (
return false;
},
/**
* @method isValid
* @return {bool}
*/
isValid : function (
)
{
return false;
},
/**
* @method createSkyboxBrush
* @param {String} arg0
@ -19308,6 +19316,16 @@ CameraBackgroundColorBrush : function (
*/
cc.CameraBackgroundSkyBoxBrush = {
/**
* @method setTextureValid
* @param {bool} arg0
*/
setTextureValid : function (
bool
)
{
},
/**
* @method setTexture
* @param {cc.TextureCube} arg0
@ -19318,6 +19336,26 @@ texturecube
{
},
/**
* @method setActived
* @param {bool} arg0
*/
setActived : function (
bool
)
{
},
/**
* @method isActived
* @return {bool}
*/
isActived : function (
)
{
return false;
},
/**
* @method create
* @param {String} str
@ -21583,6 +21621,18 @@ SpriteBatchNode : function (
*/
cc.SpriteFrameCache = {
/**
* @method reloadTexture
* @param {String} arg0
* @return {bool}
*/
reloadTexture : function (
str
)
{
return false;
},
/**
* @method addSpriteFramesWithFileContent
* @param {String} arg0
@ -22336,6 +22386,16 @@ getTileProperties : function (
return map_object;
},
/**
* @method getExternalTilesetFileName
* @return {String}
*/
getExternalTilesetFileName : function (
)
{
return ;
},
/**
* @method getObjectGroups
* @return {Array|Array}
@ -22798,6 +22858,16 @@ str
return cc.Value;
},
/**
* @method getLayerNum
* @return {int}
*/
getLayerNum : function (
)
{
return 0;
},
/**
* @method setMapSize
* @param {size_object} arg0
@ -22831,17 +22901,13 @@ getObjectGroups : function(
},
/**
* @method initWithXML
* @param {String} arg0
* @param {String} arg1
* @return {bool}
* @method getResourceFile
* @return {String}
*/
initWithXML : function (
str,
str
getResourceFile : function (
)
{
return false;
return ;
},
/**
@ -22876,6 +22942,20 @@ getMapSize : function (
return cc.Size;
},
/**
* @method initWithXML
* @param {String} arg0
* @param {String} arg1
* @return {bool}
*/
initWithXML : function (
str,
str
)
{
return false;
},
/**
* @method getProperties
* @return {map_object}

View File

@ -1312,16 +1312,6 @@ create : function (
return ccui.Layout;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method Layout
* @constructor
@ -1742,16 +1732,6 @@ texturerestype
return ccui.Button;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method Button
* @constructor
@ -2049,16 +2029,6 @@ texturerestype
return ccui.CheckBox;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method CheckBox
* @constructor
@ -2107,16 +2077,6 @@ texturerestype
return ccui.RadioButton;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method RadioButton
* @constructor
@ -2369,16 +2329,6 @@ texturerestype
return ccui.ImageView;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method ImageView
* @constructor
@ -2657,16 +2607,6 @@ float
return ccui.Text;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method Text
* @constructor
@ -2769,16 +2709,6 @@ str
return ccui.TextAtlas;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method TextAtlas
* @constructor
@ -2913,16 +2843,6 @@ float
return ccui.LoadingBar;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method LoadingBar
* @constructor
@ -3471,16 +3391,6 @@ create : function (
return ccui.ScrollView;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method ScrollView
* @constructor
@ -3823,16 +3733,6 @@ create : function (
return ccui.ListView;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method ListView
* @constructor
@ -4131,16 +4031,6 @@ texturerestype
return ccui.Slider;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method Slider
* @constructor
@ -4873,16 +4763,6 @@ int
return ccui.TextField;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method TextField
* @constructor
@ -4963,16 +4843,6 @@ str
return ccui.TextBMFont;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method TextBMFont
* @constructor
@ -5199,16 +5069,6 @@ create : function (
return ccui.PageView;
},
/**
* @method createInstance
* @return {cc.Ref}
*/
createInstance : function (
)
{
return cc.Ref;
},
/**
* @method PageView
* @constructor

View File

@ -126,17 +126,11 @@ bool js_cocos2dx_3d_Animation3D_create(JSContext *cx, uint32_t argc, jsval *vp)
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Animation3D_create : Error processing arguments");
cocos2d::Animation3D* ret = cocos2d::Animation3D::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Animation3D>(cx, (cocos2d::Animation3D*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Animation3D::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Animation3D>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Animation3D"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
if (argc == 2) {
@ -145,17 +139,11 @@ bool js_cocos2dx_3d_Animation3D_create(JSContext *cx, uint32_t argc, jsval *vp)
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Animation3D_create : Error processing arguments");
cocos2d::Animation3D* ret = cocos2d::Animation3D::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Animation3D>(cx, (cocos2d::Animation3D*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Animation3D::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Animation3D>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Animation3D"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Animation3D_create : wrong number of arguments");
@ -589,6 +577,7 @@ bool js_cocos2dx_3d_Animate3D_getTransitionTime(JSContext *cx, uint32_t argc, js
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
double ret = cocos2d::Animate3D::getTransitionTime();
jsval jsret = JSVAL_NULL;
jsret = DOUBLE_TO_JSVAL(ret);
@ -619,17 +608,11 @@ bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsv
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Animate3D_createWithFrames : Error processing arguments");
cocos2d::Animate3D* ret = cocos2d::Animate3D::createWithFrames(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Animate3D>(cx, (cocos2d::Animate3D*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Animate3D::createWithFrames(arg0, arg1, arg2);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Animate3D>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Animate3D"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
if (argc == 4) {
@ -650,17 +633,11 @@ bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsv
ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2);
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Animate3D_createWithFrames : Error processing arguments");
cocos2d::Animate3D* ret = cocos2d::Animate3D::createWithFrames(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Animate3D>(cx, (cocos2d::Animate3D*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Animate3D::createWithFrames(arg0, arg1, arg2, arg3);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Animate3D>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Animate3D"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Animate3D_createWithFrames : wrong number of arguments");
@ -799,17 +776,11 @@ bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp)
ok &= jsval_to_std_string(cx, args.get(4), &arg4);
ok &= jsval_to_std_string(cx, args.get(5), &arg5);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_TextureCube_create : Error processing arguments");
cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::TextureCube>(cx, (cocos2d::TextureCube*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::TextureCube>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::TextureCube"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_create : wrong number of arguments");
@ -898,17 +869,11 @@ bool js_cocos2dx_3d_AttachNode_create(JSContext *cx, uint32_t argc, jsval *vp)
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_AttachNode_create : Error processing arguments");
cocos2d::AttachNode* ret = cocos2d::AttachNode::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::AttachNode>(cx, (cocos2d::AttachNode*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::AttachNode::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::AttachNode>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::AttachNode"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_AttachNode_create : wrong number of arguments");
@ -1167,17 +1132,11 @@ bool js_cocos2dx_3d_BillBoard_createWithTexture(JSContext *cx, uint32_t argc, js
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_BillBoard_createWithTexture : Error processing arguments");
cocos2d::BillBoard* ret = cocos2d::BillBoard::createWithTexture(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::BillBoard>(cx, (cocos2d::BillBoard*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::BillBoard::createWithTexture(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::BillBoard>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::BillBoard"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
if (argc == 2) {
@ -1194,17 +1153,11 @@ bool js_cocos2dx_3d_BillBoard_createWithTexture(JSContext *cx, uint32_t argc, js
} while (0);
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_BillBoard_createWithTexture : Error processing arguments");
cocos2d::BillBoard* ret = cocos2d::BillBoard::createWithTexture(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::BillBoard>(cx, (cocos2d::BillBoard*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::BillBoard::createWithTexture(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::BillBoard>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::BillBoard"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_BillBoard_createWithTexture : wrong number of arguments");
@ -3476,6 +3429,7 @@ bool js_cocos2dx_3d_Sprite3DCache_getInstance(JSContext *cx, uint32_t argc, jsva
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Sprite3DCache* ret = cocos2d::Sprite3DCache::getInstance();
jsval jsret = JSVAL_NULL;
do {
@ -4362,6 +4316,7 @@ bool js_cocos2dx_3d_Bundle3D_createBundle(JSContext *cx, uint32_t argc, jsval *v
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Bundle3D* ret = cocos2d::Bundle3D::createBundle();
jsval jsret = JSVAL_NULL;
do {
@ -4420,6 +4375,7 @@ bool js_cocos2dx_3d_Bundle3D_loadObj(JSContext *cx, uint32_t argc, jsval *vp)
ok = false;
ok &= jsval_to_std_string(cx, args.get(3), &arg3);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadObj : Error processing arguments");
bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
@ -4441,6 +4397,7 @@ bool js_cocos2dx_3d_Bundle3D_loadObj(JSContext *cx, uint32_t argc, jsval *vp)
ok &= jsval_to_std_string(cx, args.get(3), &arg3);
std::string arg4_tmp; ok &= jsval_to_std_string(cx, args.get(4), &arg4_tmp); arg4 = arg4_tmp.c_str();
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadObj : Error processing arguments");
bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3, arg4);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);

View File

@ -193,6 +193,7 @@ bool js_cocos2dx_audioengine_AudioEngine_lazyInit(JSContext *cx, uint32_t argc,
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
bool ret = cocos2d::experimental::AudioEngine::lazyInit();
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
@ -213,6 +214,7 @@ bool js_cocos2dx_audioengine_AudioEngine_setCurrentTime(JSContext *cx, uint32_t
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_setCurrentTime : Error processing arguments");
bool ret = cocos2d::experimental::AudioEngine::setCurrentTime(arg0, arg1);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
@ -231,6 +233,7 @@ bool js_cocos2dx_audioengine_AudioEngine_getVolume(JSContext *cx, uint32_t argc,
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_getVolume : Error processing arguments");
double ret = cocos2d::experimental::AudioEngine::getVolume(arg0);
jsval jsret = JSVAL_NULL;
jsret = DOUBLE_TO_JSVAL(ret);
@ -313,6 +316,7 @@ bool js_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance(JSContext *cx, uint
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
int ret = cocos2d::experimental::AudioEngine::getMaxAudioInstance();
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
@ -331,6 +335,7 @@ bool js_cocos2dx_audioengine_AudioEngine_getCurrentTime(JSContext *cx, uint32_t
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_getCurrentTime : Error processing arguments");
double ret = cocos2d::experimental::AudioEngine::getCurrentTime(arg0);
jsval jsret = JSVAL_NULL;
jsret = DOUBLE_TO_JSVAL(ret);
@ -349,6 +354,7 @@ bool js_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance(JSContext *cx, uint
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance : Error processing arguments");
bool ret = cocos2d::experimental::AudioEngine::setMaxAudioInstance(arg0);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
@ -367,6 +373,7 @@ bool js_cocos2dx_audioengine_AudioEngine_isLoop(JSContext *cx, uint32_t argc, js
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_isLoop : Error processing arguments");
bool ret = cocos2d::experimental::AudioEngine::isLoop(arg0);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
@ -479,6 +486,7 @@ bool js_cocos2dx_audioengine_AudioEngine_play2d(JSContext *cx, uint32_t argc, js
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_play2d : Error processing arguments");
int ret = cocos2d::experimental::AudioEngine::play2d(arg0);
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
@ -491,6 +499,7 @@ bool js_cocos2dx_audioengine_AudioEngine_play2d(JSContext *cx, uint32_t argc, js
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
arg1 = JS::ToBoolean(args.get(1));
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_play2d : Error processing arguments");
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1);
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
@ -505,6 +514,7 @@ bool js_cocos2dx_audioengine_AudioEngine_play2d(JSContext *cx, uint32_t argc, js
arg1 = JS::ToBoolean(args.get(1));
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_play2d : Error processing arguments");
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
@ -529,6 +539,7 @@ bool js_cocos2dx_audioengine_AudioEngine_play2d(JSContext *cx, uint32_t argc, js
JSB_PRECONDITION2( arg3, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_play2d : Error processing arguments");
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
@ -547,6 +558,7 @@ bool js_cocos2dx_audioengine_AudioEngine_getState(JSContext *cx, uint32_t argc,
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_getState : Error processing arguments");
int ret = (int)cocos2d::experimental::AudioEngine::getState(arg0);
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
@ -597,6 +609,7 @@ bool js_cocos2dx_audioengine_AudioEngine_getDuration(JSContext *cx, uint32_t arg
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_audioengine_AudioEngine_getDuration : Error processing arguments");
double ret = cocos2d::experimental::AudioEngine::getDuration(arg0);
jsval jsret = JSVAL_NULL;
jsret = DOUBLE_TO_JSVAL(ret);
@ -629,6 +642,7 @@ bool js_cocos2dx_audioengine_AudioEngine_getDefaultProfile(JSContext *cx, uint32
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getDefaultProfile();
jsval jsret = JSVAL_NULL;
do {

File diff suppressed because it is too large Load Diff

View File

@ -648,8 +648,6 @@ bool js_cocos2dx_Sequence_constructor(JSContext *cx, uint32_t argc, jsval *vp);
void js_cocos2dx_Sequence_finalize(JSContext *cx, JSObject *obj);
void js_register_cocos2dx_Sequence(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_Sequence_init(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sequence_initWithTwoActions(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sequence_Sequence(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_Repeat_class;
@ -685,8 +683,6 @@ bool js_cocos2dx_Spawn_constructor(JSContext *cx, uint32_t argc, jsval *vp);
void js_cocos2dx_Spawn_finalize(JSContext *cx, JSObject *obj);
void js_register_cocos2dx_Spawn(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_Spawn_init(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Spawn_initWithTwoActions(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Spawn_Spawn(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_RotateTo_class;
@ -2209,6 +2205,7 @@ bool js_cocos2dx_DrawNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_clear(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_drawCardinalSpline(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_drawSolidRect(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_getLineWidth(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_drawPoint(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_drawCubicBezier(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_DrawNode_create(JSContext *cx, uint32_t argc, jsval *vp);
@ -2678,6 +2675,7 @@ bool js_cocos2dx_ParticleSystem_setRadialAccelVar(JSContext *cx, uint32_t argc,
bool js_cocos2dx_ParticleSystem_setStartSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ParticleSystem_setSpeed(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ParticleSystem_getStartSpin(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ParticleSystem_getResourceFile(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ParticleSystem_getRotatePerSecond(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ParticleSystem_setEmitterMode(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ParticleSystem_getDuration(JSContext *cx, uint32_t argc, jsval *vp);
@ -2941,6 +2939,7 @@ bool js_cocos2dx_Sprite_setFlippedY(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setFlippedX(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_getResourceType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_getBatchNode(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_getOffsetPosition(JSContext *cx, uint32_t argc, jsval *vp);
@ -2954,6 +2953,7 @@ bool js_cocos2dx_Sprite_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setDisplayFrameWithAnimationName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_getSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_getResourceName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_isDirty(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Sprite_setDirty(JSContext *cx, uint32_t argc, jsval *vp);
@ -3404,6 +3404,7 @@ bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_apply(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getBackgroundBrush(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_isBrushValid(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp);
@ -3444,6 +3445,7 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_CameraBackgroundBrush_getBrushType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundBrush_drawBackground(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundBrush_init(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundBrush_isValid(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundBrush_createSkyboxBrush(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundBrush_createColorBrush(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundBrush_createNoneBrush(JSContext *cx, uint32_t argc, jsval *vp);
@ -3479,7 +3481,10 @@ bool js_cocos2dx_CameraBackgroundSkyBoxBrush_constructor(JSContext *cx, uint32_t
void js_cocos2dx_CameraBackgroundSkyBoxBrush_finalize(JSContext *cx, JSObject *obj);
void js_register_cocos2dx_CameraBackgroundSkyBoxBrush(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_CameraBackgroundSkyBoxBrush_setTextureValid(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundSkyBoxBrush_setTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundSkyBoxBrush_setActived(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundSkyBoxBrush_isActived(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundSkyBoxBrush_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_CameraBackgroundSkyBoxBrush_CameraBackgroundSkyBoxBrush(JSContext *cx, uint32_t argc, jsval *vp);
@ -3842,6 +3847,7 @@ bool js_cocos2dx_SpriteFrameCache_constructor(JSContext *cx, uint32_t argc, jsva
void js_cocos2dx_SpriteFrameCache_finalize(JSContext *cx, JSObject *obj);
void js_register_cocos2dx_SpriteFrameCache(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_SpriteFrameCache_reloadTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_SpriteFrameCache_addSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile(JSContext *cx, uint32_t argc, jsval *vp);
@ -3957,6 +3963,7 @@ bool js_cocos2dx_TMXMapInfo_setParentGID(JSContext *cx, uint32_t argc, jsval *vp
bool js_cocos2dx_TMXMapInfo_getLayerAttribs(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXMapInfo_getTileSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXMapInfo_getTileProperties(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXMapInfo_getExternalTilesetFileName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXMapInfo_getObjectGroups(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXMapInfo_getTMXFileName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXMapInfo_setCurrentString(JSContext *cx, uint32_t argc, jsval *vp);
@ -4015,13 +4022,15 @@ void js_register_cocos2dx_TMXTiledMap(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_TMXTiledMap_setObjectGroups(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getProperty(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getLayerNum(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_setMapSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getObjectGroup(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getObjectGroups(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_initWithXML(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getResourceFile(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_initWithTMXFile(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getTileSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getMapSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_initWithXML(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getProperties(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_getPropertiesForGID(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TMXTiledMap_setTileSize(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -269,17 +269,11 @@ bool js_cocos2dx_experimental_video_VideoPlayer_create(JSContext *cx, uint32_t a
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::experimental::ui::VideoPlayer* ret = cocos2d::experimental::ui::VideoPlayer::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::experimental::ui::VideoPlayer>(cx, (cocos2d::experimental::ui::VideoPlayer*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::experimental::ui::VideoPlayer::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::experimental::ui::VideoPlayer>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::experimental::ui::VideoPlayer"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_experimental_video_VideoPlayer_create : wrong number of arguments");

View File

@ -329,17 +329,11 @@ bool js_cocos2dx_experimental_webView_WebView_create(JSContext *cx, uint32_t arg
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::experimental::ui::WebView* ret = cocos2d::experimental::ui::WebView::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::experimental::ui::WebView>(cx, (cocos2d::experimental::ui::WebView*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::experimental::ui::WebView::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::experimental::ui::WebView>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::experimental::ui::WebView"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_create : wrong number of arguments");

View File

@ -272,17 +272,11 @@ bool js_cocos2dx_extension_Control_create(JSContext *cx, uint32_t argc, jsval *v
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::extension::Control* ret = cocos2d::extension::Control::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::Control>(cx, (cocos2d::extension::Control*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::Control::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::Control>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::Control"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_Control_create : wrong number of arguments");
@ -1740,17 +1734,11 @@ bool js_cocos2dx_extension_ControlHuePicker_create(JSContext *cx, uint32_t argc,
} while (0);
ok &= jsval_to_vector2(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_extension_ControlHuePicker_create : Error processing arguments");
cocos2d::extension::ControlHuePicker* ret = cocos2d::extension::ControlHuePicker::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::ControlHuePicker>(cx, (cocos2d::extension::ControlHuePicker*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::ControlHuePicker::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::ControlHuePicker>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::ControlHuePicker"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_ControlHuePicker_create : wrong number of arguments");
@ -2036,17 +2024,11 @@ bool js_cocos2dx_extension_ControlSaturationBrightnessPicker_create(JSContext *c
} while (0);
ok &= jsval_to_vector2(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_extension_ControlSaturationBrightnessPicker_create : Error processing arguments");
cocos2d::extension::ControlSaturationBrightnessPicker* ret = cocos2d::extension::ControlSaturationBrightnessPicker::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::ControlSaturationBrightnessPicker>(cx, (cocos2d::extension::ControlSaturationBrightnessPicker*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::ControlSaturationBrightnessPicker::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::ControlSaturationBrightnessPicker>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::ControlSaturationBrightnessPicker"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_ControlSaturationBrightnessPicker_create : wrong number of arguments");
@ -2349,17 +2331,11 @@ bool js_cocos2dx_extension_ControlColourPicker_create(JSContext *cx, uint32_t ar
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::extension::ControlColourPicker* ret = cocos2d::extension::ControlColourPicker::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::ControlColourPicker>(cx, (cocos2d::extension::ControlColourPicker*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::ControlColourPicker::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::ControlColourPicker>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::ControlColourPicker"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_ControlColourPicker_create : wrong number of arguments");
@ -2887,17 +2863,11 @@ bool js_cocos2dx_extension_ControlPotentiometer_create(JSContext *cx, uint32_t a
std::string arg1_tmp; ok &= jsval_to_std_string(cx, args.get(1), &arg1_tmp); arg1 = arg1_tmp.c_str();
std::string arg2_tmp; ok &= jsval_to_std_string(cx, args.get(2), &arg2_tmp); arg2 = arg2_tmp.c_str();
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_extension_ControlPotentiometer_create : Error processing arguments");
cocos2d::extension::ControlPotentiometer* ret = cocos2d::extension::ControlPotentiometer::create(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::ControlPotentiometer>(cx, (cocos2d::extension::ControlPotentiometer*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::ControlPotentiometer::create(arg0, arg1, arg2);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::ControlPotentiometer>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::ControlPotentiometer"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_ControlPotentiometer_create : wrong number of arguments");
@ -4308,17 +4278,11 @@ bool js_cocos2dx_extension_ControlStepper_create(JSContext *cx, uint32_t argc, j
JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_extension_ControlStepper_create : Error processing arguments");
cocos2d::extension::ControlStepper* ret = cocos2d::extension::ControlStepper::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::ControlStepper>(cx, (cocos2d::extension::ControlStepper*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::ControlStepper::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::ControlStepper>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::ControlStepper"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_ControlStepper_create : wrong number of arguments");
@ -5840,17 +5804,11 @@ bool js_cocos2dx_extension_TableViewCell_create(JSContext *cx, uint32_t argc, js
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::extension::TableViewCell* ret = cocos2d::extension::TableViewCell::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::TableViewCell>(cx, (cocos2d::extension::TableViewCell*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::TableViewCell::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::TableViewCell>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::TableViewCell"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_TableViewCell_create : wrong number of arguments");
@ -6869,17 +6827,11 @@ bool js_cocos2dx_extension_AssetsManagerEx_create(JSContext *cx, uint32_t argc,
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_extension_AssetsManagerEx_create : Error processing arguments");
cocos2d::extension::AssetsManagerEx* ret = cocos2d::extension::AssetsManagerEx::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::AssetsManagerEx>(cx, (cocos2d::extension::AssetsManagerEx*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::AssetsManagerEx::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::AssetsManagerEx>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::AssetsManagerEx"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_AssetsManagerEx_create : wrong number of arguments");
@ -7068,17 +7020,11 @@ bool js_cocos2dx_extension_EventListenerAssetsManagerEx_create(JSContext *cx, ui
} while(0)
;
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_extension_EventListenerAssetsManagerEx_create : Error processing arguments");
cocos2d::extension::EventListenerAssetsManagerEx* ret = cocos2d::extension::EventListenerAssetsManagerEx::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::extension::EventListenerAssetsManagerEx>(cx, (cocos2d::extension::EventListenerAssetsManagerEx*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::extension::EventListenerAssetsManagerEx::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::extension::EventListenerAssetsManagerEx>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::extension::EventListenerAssetsManagerEx"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_extension_EventListenerAssetsManagerEx_create : wrong number of arguments");

View File

@ -522,6 +522,7 @@ bool js_cocos2dx_navmesh_NavMeshAgent_getNavMeshAgentComponentName(JSContext *cx
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
const std::string& ret = cocos2d::NavMeshAgent::getNavMeshAgentComponentName();
jsval jsret = JSVAL_NULL;
jsret = std_string_to_jsval(cx, ret);
@ -540,17 +541,11 @@ bool js_cocos2dx_navmesh_NavMeshAgent_create(JSContext *cx, uint32_t argc, jsval
cocos2d::NavMeshAgentParam arg0;
ok &= jsval_to_NavMeshAgentParam(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_navmesh_NavMeshAgent_create : Error processing arguments");
cocos2d::NavMeshAgent* ret = cocos2d::NavMeshAgent::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::NavMeshAgent>(cx, (cocos2d::NavMeshAgent*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::NavMeshAgent::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::NavMeshAgent>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::NavMeshAgent"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_navmesh_NavMeshAgent_create : wrong number of arguments");
@ -790,17 +785,11 @@ bool js_cocos2dx_navmesh_NavMeshObstacle_create(JSContext *cx, uint32_t argc, js
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_navmesh_NavMeshObstacle_create : Error processing arguments");
cocos2d::NavMeshObstacle* ret = cocos2d::NavMeshObstacle::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::NavMeshObstacle>(cx, (cocos2d::NavMeshObstacle*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::NavMeshObstacle::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::NavMeshObstacle>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::NavMeshObstacle"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_navmesh_NavMeshObstacle_create : wrong number of arguments");
@ -811,6 +800,7 @@ bool js_cocos2dx_navmesh_NavMeshObstacle_getNavMeshObstacleComponentName(JSConte
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
const std::string& ret = cocos2d::NavMeshObstacle::getNavMeshObstacleComponentName();
jsval jsret = JSVAL_NULL;
jsret = std_string_to_jsval(cx, ret);
@ -1102,17 +1092,11 @@ bool js_cocos2dx_navmesh_NavMesh_create(JSContext *cx, uint32_t argc, jsval *vp)
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_navmesh_NavMesh_create : Error processing arguments");
cocos2d::NavMesh* ret = cocos2d::NavMesh::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::NavMesh>(cx, (cocos2d::NavMesh*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::NavMesh::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::NavMesh>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::NavMesh"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_navmesh_NavMesh_create : wrong number of arguments");

View File

@ -199,17 +199,11 @@ bool js_cocos2dx_physics3d_Physics3DShape_createBox(JSContext *cx, uint32_t argc
cocos2d::Vec3 arg0;
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createBox : Error processing arguments");
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createBox(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DShape>(cx, (cocos2d::Physics3DShape*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DShape::createBox(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DShape>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DShape"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createBox : wrong number of arguments");
@ -226,17 +220,11 @@ bool js_cocos2dx_physics3d_Physics3DShape_createCylinder(JSContext *cx, uint32_t
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createCylinder : Error processing arguments");
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCylinder(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DShape>(cx, (cocos2d::Physics3DShape*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DShape::createCylinder(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DShape>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DShape"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createCylinder : wrong number of arguments");
@ -261,17 +249,11 @@ bool js_cocos2dx_physics3d_Physics3DShape_createConvexHull(JSContext *cx, uint32
} while (0);
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createConvexHull : Error processing arguments");
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createConvexHull(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DShape>(cx, (cocos2d::Physics3DShape*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DShape::createConvexHull(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DShape>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DShape"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createConvexHull : wrong number of arguments");
@ -288,17 +270,11 @@ bool js_cocos2dx_physics3d_Physics3DShape_createCapsule(JSContext *cx, uint32_t
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createCapsule : Error processing arguments");
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCapsule(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DShape>(cx, (cocos2d::Physics3DShape*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DShape::createCapsule(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DShape>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DShape"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createCapsule : wrong number of arguments");
@ -313,17 +289,11 @@ bool js_cocos2dx_physics3d_Physics3DShape_createSphere(JSContext *cx, uint32_t a
double arg0 = 0;
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createSphere : Error processing arguments");
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createSphere(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DShape>(cx, (cocos2d::Physics3DShape*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DShape::createSphere(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DShape>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DShape"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createSphere : wrong number of arguments");
@ -2055,6 +2025,7 @@ bool js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName(JSContex
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
std::string& ret = cocos2d::Physics3DComponent::getPhysics3DComponentName();
jsval jsret = JSVAL_NULL;
jsret = std_string_to_jsval(cx, ret);
@ -2723,17 +2694,11 @@ bool js_cocos2dx_physics3d_Physics3DWorld_create(JSContext *cx, uint32_t argc, j
#pragma warning NO CONVERSION TO NATIVE FOR Physics3DWorldDes*
ok = false;
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_create : Error processing arguments");
cocos2d::Physics3DWorld* ret = cocos2d::Physics3DWorld::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DWorld>(cx, (cocos2d::Physics3DWorld*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DWorld::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DWorld>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DWorld"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_create : wrong number of arguments");
@ -5585,17 +5550,11 @@ bool js_cocos2dx_physics3d_Physics3DSliderConstraint_create(JSContext *cx, uint3
ok &= jsval_to_matrix(cx, args.get(3), &arg3);
arg4 = JS::ToBoolean(args.get(4));
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_create : Error processing arguments");
cocos2d::Physics3DSliderConstraint* ret = cocos2d::Physics3DSliderConstraint::create(arg0, arg1, arg2, arg3, arg4);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DSliderConstraint>(cx, (cocos2d::Physics3DSliderConstraint*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::Physics3DSliderConstraint::create(arg0, arg1, arg2, arg3, arg4);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Physics3DSliderConstraint>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::Physics3DSliderConstraint"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_create : wrong number of arguments");

View File

@ -707,6 +707,7 @@ bool js_cocos2dx_studio_ActionManagerEx_getInstance(JSContext *cx, uint32_t argc
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ActionManagerEx* ret = cocostudio::ActionManagerEx::getInstance();
jsval jsret = JSVAL_NULL;
do {
@ -818,17 +819,11 @@ bool js_cocos2dx_studio_BaseData_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::BaseData* ret = cocostudio::BaseData::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::BaseData>(cx, (cocostudio::BaseData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::BaseData::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::BaseData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::BaseData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_BaseData_create : wrong number of arguments");
@ -960,17 +955,11 @@ bool js_cocos2dx_studio_MovementData_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::MovementData* ret = cocostudio::MovementData::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::MovementData>(cx, (cocostudio::MovementData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::MovementData::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::MovementData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::MovementData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_MovementData_create : wrong number of arguments");
@ -1120,17 +1109,11 @@ bool js_cocos2dx_studio_AnimationData_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::AnimationData* ret = cocostudio::AnimationData::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::AnimationData>(cx, (cocostudio::AnimationData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::AnimationData::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::AnimationData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::AnimationData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_AnimationData_create : wrong number of arguments");
@ -1244,17 +1227,11 @@ bool js_cocos2dx_studio_ContourData_create(JSContext *cx, uint32_t argc, jsval *
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ContourData* ret = cocostudio::ContourData::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::ContourData>(cx, (cocostudio::ContourData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::ContourData::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::ContourData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::ContourData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ContourData_create : wrong number of arguments");
@ -1404,17 +1381,11 @@ bool js_cocos2dx_studio_TextureData_create(JSContext *cx, uint32_t argc, jsval *
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::TextureData* ret = cocostudio::TextureData::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::TextureData>(cx, (cocostudio::TextureData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::TextureData::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::TextureData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::TextureData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_TextureData_create : wrong number of arguments");
@ -2036,17 +2007,11 @@ bool js_cocos2dx_studio_Tween_create(JSContext *cx, uint32_t argc, jsval *vp)
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_studio_Tween_create : Error processing arguments");
cocostudio::Tween* ret = cocostudio::Tween::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::Tween>(cx, (cocostudio::Tween*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::Tween::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::Tween>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::Tween"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_Tween_create : wrong number of arguments");
@ -2687,17 +2652,11 @@ bool js_cocos2dx_studio_DecorativeDisplay_create(JSContext *cx, uint32_t argc, j
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::DecorativeDisplay* ret = cocostudio::DecorativeDisplay::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::DecorativeDisplay>(cx, (cocostudio::DecorativeDisplay*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::DecorativeDisplay::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::DecorativeDisplay>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::DecorativeDisplay"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_DecorativeDisplay_create : wrong number of arguments");
@ -3305,17 +3264,11 @@ bool js_cocos2dx_studio_DisplayManager_create(JSContext *cx, uint32_t argc, jsva
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_studio_DisplayManager_create : Error processing arguments");
cocostudio::DisplayManager* ret = cocostudio::DisplayManager::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::DisplayManager>(cx, (cocostudio::DisplayManager*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::DisplayManager::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::DisplayManager>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::DisplayManager"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_DisplayManager_create : wrong number of arguments");
@ -4305,17 +4258,11 @@ bool js_cocos2dx_studio_BatchNode_create(JSContext *cx, uint32_t argc, jsval *vp
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::BatchNode* ret = cocostudio::BatchNode::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::BatchNode>(cx, (cocostudio::BatchNode*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::BatchNode::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::BatchNode>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::BatchNode"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_BatchNode_create : wrong number of arguments");
@ -4752,17 +4699,11 @@ bool js_cocos2dx_studio_ArmatureAnimation_create(JSContext *cx, uint32_t argc, j
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_studio_ArmatureAnimation_create : Error processing arguments");
cocostudio::ArmatureAnimation* ret = cocostudio::ArmatureAnimation::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::ArmatureAnimation>(cx, (cocostudio::ArmatureAnimation*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::ArmatureAnimation::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::ArmatureAnimation>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::ArmatureAnimation"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ArmatureAnimation_create : wrong number of arguments");
@ -5328,6 +5269,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_getInstance(JSContext *cx, uint32_t
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ArmatureDataManager* ret = cocostudio::ArmatureDataManager::getInstance();
jsval jsret = JSVAL_NULL;
do {
@ -6321,17 +6263,11 @@ bool js_cocos2dx_studio_Skin_createWithSpriteFrameName(JSContext *cx, uint32_t a
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_studio_Skin_createWithSpriteFrameName : Error processing arguments");
cocostudio::Skin* ret = cocostudio::Skin::createWithSpriteFrameName(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::Skin>(cx, (cocostudio::Skin*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::Skin::createWithSpriteFrameName(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::Skin>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::Skin"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_Skin_createWithSpriteFrameName : wrong number of arguments");
@ -6659,17 +6595,11 @@ bool js_cocos2dx_studio_ComAttribute_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ComAttribute* ret = cocostudio::ComAttribute::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::ComAttribute>(cx, (cocostudio::ComAttribute*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::ComAttribute::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::ComAttribute>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::ComAttribute"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ComAttribute_create : wrong number of arguments");
@ -7304,17 +7234,11 @@ bool js_cocos2dx_studio_ComAudio_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ComAudio* ret = cocostudio::ComAudio::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::ComAudio>(cx, (cocostudio::ComAudio*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::ComAudio::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::ComAudio>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::ComAudio"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ComAudio_create : wrong number of arguments");
@ -7659,17 +7583,11 @@ bool js_cocos2dx_studio_ComController_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ComController* ret = cocostudio::ComController::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::ComController>(cx, (cocostudio::ComController*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::ComController::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::ComController>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::ComController"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ComController_create : wrong number of arguments");
@ -8357,17 +8275,11 @@ bool js_cocos2dx_studio_VisibleFrame_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::VisibleFrame* ret = cocostudio::timeline::VisibleFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::VisibleFrame>(cx, (cocostudio::timeline::VisibleFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::VisibleFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::VisibleFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::VisibleFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_VisibleFrame_create : wrong number of arguments");
@ -8483,17 +8395,11 @@ bool js_cocos2dx_studio_TextureFrame_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::TextureFrame* ret = cocostudio::timeline::TextureFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::TextureFrame>(cx, (cocostudio::timeline::TextureFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::TextureFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::TextureFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::TextureFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_TextureFrame_create : wrong number of arguments");
@ -8609,17 +8515,11 @@ bool js_cocos2dx_studio_RotationFrame_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::RotationFrame* ret = cocostudio::timeline::RotationFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::RotationFrame>(cx, (cocostudio::timeline::RotationFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::RotationFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::RotationFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::RotationFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_RotationFrame_create : wrong number of arguments");
@ -8773,17 +8673,11 @@ bool js_cocos2dx_studio_SkewFrame_create(JSContext *cx, uint32_t argc, jsval *vp
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::SkewFrame* ret = cocostudio::timeline::SkewFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::SkewFrame>(cx, (cocostudio::timeline::SkewFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::SkewFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::SkewFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::SkewFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_SkewFrame_create : wrong number of arguments");
@ -8863,17 +8757,11 @@ bool js_cocos2dx_studio_RotationSkewFrame_create(JSContext *cx, uint32_t argc, j
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::RotationSkewFrame* ret = cocostudio::timeline::RotationSkewFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::RotationSkewFrame>(cx, (cocostudio::timeline::RotationSkewFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::RotationSkewFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::RotationSkewFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::RotationSkewFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_RotationSkewFrame_create : wrong number of arguments");
@ -9063,17 +8951,11 @@ bool js_cocos2dx_studio_PositionFrame_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::PositionFrame* ret = cocostudio::timeline::PositionFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::PositionFrame>(cx, (cocostudio::timeline::PositionFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::PositionFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::PositionFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::PositionFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_PositionFrame_create : wrong number of arguments");
@ -9251,17 +9133,11 @@ bool js_cocos2dx_studio_ScaleFrame_create(JSContext *cx, uint32_t argc, jsval *v
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::ScaleFrame* ret = cocostudio::timeline::ScaleFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::ScaleFrame>(cx, (cocostudio::timeline::ScaleFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::ScaleFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::ScaleFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::ScaleFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ScaleFrame_create : wrong number of arguments");
@ -9380,17 +9256,11 @@ bool js_cocos2dx_studio_AnchorPointFrame_create(JSContext *cx, uint32_t argc, js
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::AnchorPointFrame* ret = cocostudio::timeline::AnchorPointFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::AnchorPointFrame>(cx, (cocostudio::timeline::AnchorPointFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::AnchorPointFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::AnchorPointFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::AnchorPointFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_AnchorPointFrame_create : wrong number of arguments");
@ -9660,17 +9530,11 @@ bool js_cocos2dx_studio_InnerActionFrame_create(JSContext *cx, uint32_t argc, js
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::InnerActionFrame* ret = cocostudio::timeline::InnerActionFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::InnerActionFrame>(cx, (cocostudio::timeline::InnerActionFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::InnerActionFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::InnerActionFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::InnerActionFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_InnerActionFrame_create : wrong number of arguments");
@ -9794,17 +9658,11 @@ bool js_cocos2dx_studio_ColorFrame_create(JSContext *cx, uint32_t argc, jsval *v
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::ColorFrame* ret = cocostudio::timeline::ColorFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::ColorFrame>(cx, (cocostudio::timeline::ColorFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::ColorFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::ColorFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::ColorFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ColorFrame_create : wrong number of arguments");
@ -9920,17 +9778,11 @@ bool js_cocos2dx_studio_AlphaFrame_create(JSContext *cx, uint32_t argc, jsval *v
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::AlphaFrame* ret = cocostudio::timeline::AlphaFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::AlphaFrame>(cx, (cocostudio::timeline::AlphaFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::AlphaFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::AlphaFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::AlphaFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_AlphaFrame_create : wrong number of arguments");
@ -10062,17 +9914,11 @@ bool js_cocos2dx_studio_EventFrame_create(JSContext *cx, uint32_t argc, jsval *v
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::EventFrame* ret = cocostudio::timeline::EventFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::EventFrame>(cx, (cocostudio::timeline::EventFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::EventFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::EventFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::EventFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_EventFrame_create : wrong number of arguments");
@ -10189,17 +10035,11 @@ bool js_cocos2dx_studio_ZOrderFrame_create(JSContext *cx, uint32_t argc, jsval *
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::ZOrderFrame* ret = cocostudio::timeline::ZOrderFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::ZOrderFrame>(cx, (cocostudio::timeline::ZOrderFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::ZOrderFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::ZOrderFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::ZOrderFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ZOrderFrame_create : wrong number of arguments");
@ -10315,17 +10155,11 @@ bool js_cocos2dx_studio_BlendFuncFrame_create(JSContext *cx, uint32_t argc, jsva
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::BlendFuncFrame* ret = cocostudio::timeline::BlendFuncFrame::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::BlendFuncFrame>(cx, (cocostudio::timeline::BlendFuncFrame*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::BlendFuncFrame::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::BlendFuncFrame>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::BlendFuncFrame"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_BlendFuncFrame_create : wrong number of arguments");
@ -10716,17 +10550,11 @@ bool js_cocos2dx_studio_Timeline_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::Timeline* ret = cocostudio::timeline::Timeline::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::Timeline>(cx, (cocostudio::timeline::Timeline*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::Timeline::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::Timeline>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::Timeline"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_Timeline_create : wrong number of arguments");
@ -10876,17 +10704,11 @@ bool js_cocos2dx_studio_ActionTimelineData_create(JSContext *cx, uint32_t argc,
int arg0 = 0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_studio_ActionTimelineData_create : Error processing arguments");
cocostudio::timeline::ActionTimelineData* ret = cocostudio::timeline::ActionTimelineData::create(arg0);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::ActionTimelineData>(cx, (cocostudio::timeline::ActionTimelineData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::ActionTimelineData::create(arg0);
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::ActionTimelineData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::ActionTimelineData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ActionTimelineData_create : wrong number of arguments");
@ -11718,17 +11540,11 @@ bool js_cocos2dx_studio_ActionTimeline_create(JSContext *cx, uint32_t argc, jsva
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::ActionTimeline* ret = cocostudio::timeline::ActionTimeline::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::ActionTimeline>(cx, (cocostudio::timeline::ActionTimeline*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::ActionTimeline::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::ActionTimeline>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::ActionTimeline"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ActionTimeline_create : wrong number of arguments");
@ -12545,17 +12361,11 @@ bool js_cocos2dx_studio_SkeletonNode_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::timeline::SkeletonNode* ret = cocostudio::timeline::SkeletonNode::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::timeline::SkeletonNode>(cx, (cocostudio::timeline::SkeletonNode*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::timeline::SkeletonNode::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::timeline::SkeletonNode>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::timeline::SkeletonNode"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_SkeletonNode_create : wrong number of arguments");
@ -12727,17 +12537,11 @@ bool js_cocos2dx_studio_ComExtensionData_create(JSContext *cx, uint32_t argc, js
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocostudio::ComExtensionData* ret = cocostudio::ComExtensionData::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocostudio::ComExtensionData>(cx, (cocostudio::ComExtensionData*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocostudio::ComExtensionData::create();
js_type_class_t *typeClass = js_get_type_from_native<cocostudio::ComExtensionData>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocostudio::ComExtensionData"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_studio_ComExtensionData_create : wrong number of arguments");

View File

@ -123,17 +123,11 @@ bool js_cocos2dx_ui_LayoutParameter_create(JSContext *cx, uint32_t argc, jsval *
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::LayoutParameter* ret = cocos2d::ui::LayoutParameter::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::LayoutParameter>(cx, (cocos2d::ui::LayoutParameter*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::LayoutParameter::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::LayoutParameter>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::LayoutParameter"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_LayoutParameter_create : wrong number of arguments");
@ -248,17 +242,11 @@ bool js_cocos2dx_ui_LinearLayoutParameter_create(JSContext *cx, uint32_t argc, j
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::LinearLayoutParameter* ret = cocos2d::ui::LinearLayoutParameter::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::LinearLayoutParameter>(cx, (cocos2d::ui::LinearLayoutParameter*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::LinearLayoutParameter::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::LinearLayoutParameter>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::LinearLayoutParameter"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_LinearLayoutParameter_create : wrong number of arguments");
@ -450,17 +438,11 @@ bool js_cocos2dx_ui_RelativeLayoutParameter_create(JSContext *cx, uint32_t argc,
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::RelativeLayoutParameter* ret = cocos2d::ui::RelativeLayoutParameter::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::RelativeLayoutParameter>(cx, (cocos2d::ui::RelativeLayoutParameter*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::RelativeLayoutParameter::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::RelativeLayoutParameter>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::RelativeLayoutParameter"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_create : wrong number of arguments");
@ -2114,6 +2096,7 @@ bool js_cocos2dx_ui_Widget_getCurrentFocusedWidget(JSContext *cx, uint32_t argc,
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::Widget* ret = cocos2d::ui::Widget::getCurrentFocusedWidget();
jsval jsret = JSVAL_NULL;
do {
@ -2135,17 +2118,11 @@ bool js_cocos2dx_ui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::Widget* ret = cocos2d::ui::Widget::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::Widget>(cx, (cocos2d::ui::Widget*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::Widget::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::Widget>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::Widget"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Widget_create : wrong number of arguments");
@ -2971,44 +2948,17 @@ bool js_cocos2dx_ui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::Layout* ret = cocos2d::ui::Layout::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::Layout>(cx, (cocos2d::ui::Layout*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::Layout::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::Layout>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::Layout"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Layout_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Layout_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::Layout::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Layout_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Layout_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -3101,7 +3051,6 @@ void js_register_cocos2dx_ui_Layout(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_Layout_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_Layout_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -4087,27 +4036,6 @@ bool js_cocos2dx_ui_Button_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_Button_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Button_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::Button::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Button_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Button_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -4203,7 +4131,6 @@ void js_register_cocos2dx_ui_Button(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_Button_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_Button_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -5019,27 +4946,6 @@ bool js_cocos2dx_ui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_CheckBox_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::CheckBox::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_CheckBox_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -5099,7 +5005,6 @@ void js_register_cocos2dx_ui_CheckBox(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_CheckBox_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_CheckBox_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -5311,27 +5216,6 @@ bool js_cocos2dx_ui_RadioButton_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_RadioButton_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_RadioButton_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::RadioButton::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RadioButton_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_RadioButton_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -5391,7 +5275,6 @@ void js_register_cocos2dx_ui_RadioButton(JSContext *cx, JS::HandleObject global)
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_RadioButton_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_RadioButton_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -5733,17 +5616,11 @@ bool js_cocos2dx_ui_RadioButtonGroup_create(JSContext *cx, uint32_t argc, jsval
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::RadioButtonGroup* ret = cocos2d::ui::RadioButtonGroup::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::RadioButtonGroup>(cx, (cocos2d::ui::RadioButtonGroup*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::RadioButtonGroup::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::RadioButtonGroup>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::RadioButtonGroup"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RadioButtonGroup_create : wrong number of arguments");
@ -6086,27 +5963,6 @@ bool js_cocos2dx_ui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_ImageView_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_ImageView_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::ImageView::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ImageView_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -6173,7 +6029,6 @@ void js_register_cocos2dx_ui_ImageView(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_ImageView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_ImageView_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -6761,27 +6616,6 @@ bool js_cocos2dx_ui_Text_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_Text_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Text_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::Text::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Text_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Text_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -6864,7 +6698,6 @@ void js_register_cocos2dx_ui_Text(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_Text_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_Text_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -7062,27 +6895,6 @@ bool js_cocos2dx_ui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_TextAtlas_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::TextAtlas::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_TextAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -7147,7 +6959,6 @@ void js_register_cocos2dx_ui_TextAtlas(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_TextAtlas_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_TextAtlas_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -7485,27 +7296,6 @@ bool js_cocos2dx_ui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_LoadingBar_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::LoadingBar::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_LoadingBar_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -7574,7 +7364,6 @@ void js_register_cocos2dx_ui_LoadingBar(JSContext *cx, JS::HandleObject global)
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_LoadingBar_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_LoadingBar_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -8627,44 +8416,17 @@ bool js_cocos2dx_ui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::ScrollView* ret = cocos2d::ui::ScrollView::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::ScrollView>(cx, (cocos2d::ui::ScrollView*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::ScrollView::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::ScrollView>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::ScrollView"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_ScrollView_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::ScrollView::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_ScrollView_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -8774,7 +8536,6 @@ void js_register_cocos2dx_ui_ScrollView(JSContext *cx, JS::HandleObject global)
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_ScrollView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_ScrollView_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -9533,44 +9294,17 @@ bool js_cocos2dx_ui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::ListView* ret = cocos2d::ui::ListView::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::ListView>(cx, (cocos2d::ui::ListView*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::ListView::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::ListView>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::ListView"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ListView_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_ListView_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::ListView::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ListView_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_ListView_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -9659,7 +9393,6 @@ void js_register_cocos2dx_ui_ListView(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_ListView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_ListView_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -10349,27 +10082,6 @@ bool js_cocos2dx_ui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_Slider_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Slider_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::Slider::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Slider_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_Slider_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -10453,7 +10165,6 @@ void js_register_cocos2dx_ui_Slider(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_Slider_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_Slider_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -11011,17 +10722,11 @@ bool js_cocos2dx_ui_UICCTextField_create(JSContext *cx, uint32_t argc, jsval *vp
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_UICCTextField_create : Error processing arguments");
cocos2d::ui::UICCTextField* ret = cocos2d::ui::UICCTextField::create(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::UICCTextField>(cx, (cocos2d::ui::UICCTextField*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::UICCTextField::create(arg0, arg1, arg2);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::UICCTextField>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::UICCTextField"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_UICCTextField_create : wrong number of arguments");
@ -11988,27 +11693,6 @@ bool js_cocos2dx_ui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_TextField_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_TextField_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::TextField::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_TextField_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_TextField_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -12108,7 +11792,6 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_TextField_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_TextField_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -12273,27 +11956,6 @@ bool js_cocos2dx_ui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_TextBMFont_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::TextBMFont::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_TextBMFont_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -12357,7 +12019,6 @@ void js_register_cocos2dx_ui_TextBMFont(JSContext *cx, JS::HandleObject global)
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_TextBMFont_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_TextBMFont_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -12825,44 +12486,17 @@ bool js_cocos2dx_ui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::PageView* ret = cocos2d::ui::PageView::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::PageView>(cx, (cocos2d::ui::PageView*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::PageView::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::PageView>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::PageView"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_PageView_create : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_PageView_createInstance(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::Ref* ret = cocos2d::ui::PageView::createInstance();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Ref>(cx, (cocos2d::Ref*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_PageView_createInstance : wrong number of arguments");
return false;
}
bool js_cocos2dx_ui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -12941,7 +12575,6 @@ void js_register_cocos2dx_ui_PageView(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec st_funcs[] = {
JS_FN("create", js_cocos2dx_ui_PageView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createInstance", js_cocos2dx_ui_PageView_createInstance, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
@ -12977,6 +12610,7 @@ bool js_cocos2dx_ui_Helper_getSubStringOfUTF8String(JSContext *cx, uint32_t argc
ok &= jsval_to_ulong(cx, args.get(1), &arg1);
ok &= jsval_to_ulong(cx, args.get(2), &arg2);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_getSubStringOfUTF8String : Error processing arguments");
std::string ret = cocos2d::ui::Helper::getSubStringOfUTF8String(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL;
jsret = std_string_to_jsval(cx, ret);
@ -13003,6 +12637,7 @@ bool js_cocos2dx_ui_Helper_convertBoundingBoxToScreen(JSContext *cx, uint32_t ar
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_convertBoundingBoxToScreen : Error processing arguments");
cocos2d::Rect ret = cocos2d::ui::Helper::convertBoundingBoxToScreen(arg0);
jsval jsret = JSVAL_NULL;
jsret = ccrect_to_jsval(cx, ret);
@ -13047,6 +12682,7 @@ bool js_cocos2dx_ui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t a
} while (0);
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekActionWidgetByActionTag : Error processing arguments");
cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekActionWidgetByActionTag(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
@ -13082,6 +12718,7 @@ bool js_cocos2dx_ui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval
} while (0);
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekWidgetByName : Error processing arguments");
cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByName(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
@ -13117,6 +12754,7 @@ bool js_cocos2dx_ui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval *
} while (0);
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekWidgetByTag : Error processing arguments");
cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByTag(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
@ -13144,6 +12782,7 @@ bool js_cocos2dx_ui_Helper_restrictCapInsetRect(JSContext *cx, uint32_t argc, js
ok &= jsval_to_ccrect(cx, args.get(0), &arg0);
ok &= jsval_to_ccsize(cx, args.get(1), &arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_restrictCapInsetRect : Error processing arguments");
cocos2d::Rect ret = cocos2d::ui::Helper::restrictCapInsetRect(arg0, arg1);
jsval jsret = JSVAL_NULL;
jsret = ccrect_to_jsval(cx, ret);
@ -13383,17 +13022,11 @@ bool js_cocos2dx_ui_RichElementText_create(JSContext *cx, uint32_t argc, jsval *
ok &= jsval_to_std_string(cx, args.get(4), &arg4);
ok &= JS::ToNumber( cx, args.get(5), &arg5) && !isnan(arg5);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RichElementText_create : Error processing arguments");
cocos2d::ui::RichElementText* ret = cocos2d::ui::RichElementText::create(arg0, arg1, arg2, arg3, arg4, arg5);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::RichElementText>(cx, (cocos2d::ui::RichElementText*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::RichElementText::create(arg0, arg1, arg2, arg3, arg4, arg5);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::RichElementText>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::RichElementText"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RichElementText_create : wrong number of arguments");
@ -13524,17 +13157,11 @@ bool js_cocos2dx_ui_RichElementImage_create(JSContext *cx, uint32_t argc, jsval
ok &= jsval_to_uint16(cx, args.get(2), &arg2);
ok &= jsval_to_std_string(cx, args.get(3), &arg3);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RichElementImage_create : Error processing arguments");
cocos2d::ui::RichElementImage* ret = cocos2d::ui::RichElementImage::create(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::RichElementImage>(cx, (cocos2d::ui::RichElementImage*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::RichElementImage::create(arg0, arg1, arg2, arg3);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::RichElementImage>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::RichElementImage"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RichElementImage_create : wrong number of arguments");
@ -13681,17 +13308,11 @@ bool js_cocos2dx_ui_RichElementCustomNode_create(JSContext *cx, uint32_t argc, j
JSB_PRECONDITION2( arg3, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RichElementCustomNode_create : Error processing arguments");
cocos2d::ui::RichElementCustomNode* ret = cocos2d::ui::RichElementCustomNode::create(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::RichElementCustomNode>(cx, (cocos2d::ui::RichElementCustomNode*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::RichElementCustomNode::create(arg0, arg1, arg2, arg3);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::RichElementCustomNode>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::RichElementCustomNode"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RichElementCustomNode_create : wrong number of arguments");
@ -13922,17 +13543,11 @@ bool js_cocos2dx_ui_RichText_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::RichText* ret = cocos2d::ui::RichText::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::RichText>(cx, (cocos2d::ui::RichText*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::RichText::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::RichText>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::RichText"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_RichText_create : wrong number of arguments");
@ -17460,17 +17075,11 @@ bool js_cocos2dx_ui_LayoutComponent_create(JSContext *cx, uint32_t argc, jsval *
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (argc == 0) {
cocos2d::ui::LayoutComponent* ret = cocos2d::ui::LayoutComponent::create();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::LayoutComponent>(cx, (cocos2d::ui::LayoutComponent*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::LayoutComponent::create();
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::LayoutComponent>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::LayoutComponent"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_LayoutComponent_create : wrong number of arguments");
@ -17493,6 +17102,7 @@ bool js_cocos2dx_ui_LayoutComponent_bindLayoutComponent(JSContext *cx, uint32_t
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LayoutComponent_bindLayoutComponent : Error processing arguments");
cocos2d::ui::LayoutComponent* ret = cocos2d::ui::LayoutComponent::bindLayoutComponent(arg0);
jsval jsret = JSVAL_NULL;
do {
@ -17831,17 +17441,11 @@ bool js_cocos2dx_ui_ScrollViewBar_create(JSContext *cx, uint32_t argc, jsval *vp
} while (0);
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollViewBar_create : Error processing arguments");
cocos2d::ui::ScrollViewBar* ret = cocos2d::ui::ScrollViewBar::create(arg0, arg1);
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::ui::ScrollViewBar>(cx, (cocos2d::ui::ScrollViewBar*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
auto ret = cocos2d::ui::ScrollViewBar::create(arg0, arg1);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::ui::ScrollViewBar>(ret);
JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "cocos2d::ui::ScrollViewBar"));
args.rval().set(OBJECT_TO_JSVAL(jsret));
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ScrollViewBar_create : wrong number of arguments");

View File

@ -170,7 +170,6 @@ bool js_cocos2dx_ui_Layout_getBackGroundStartColor(JSContext *cx, uint32_t argc,
bool js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Layout_setLayoutType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Layout_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Layout_Layout(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_Button_class;
@ -218,7 +217,6 @@ bool js_cocos2dx_ui_Button_getTitleColor(JSContext *cx, uint32_t argc, jsval *vp
bool js_cocos2dx_ui_Button_setPressedActionEnabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_setZoomScale(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Button_Button(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_AbstractCheckButton_class;
@ -259,7 +257,6 @@ void js_register_cocos2dx_ui_CheckBox(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx_ui(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_ui_CheckBox_addEventListener(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_CheckBox_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_CheckBox_CheckBox(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_RadioButton_class;
@ -271,7 +268,6 @@ void js_register_cocos2dx_ui_RadioButton(JSContext *cx, JS::HandleObject global)
void register_all_cocos2dx_ui(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_ui_RadioButton_addEventListener(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RadioButton_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RadioButton_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_RadioButton_RadioButton(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_RadioButtonGroup_class;
@ -311,7 +307,6 @@ bool js_cocos2dx_ui_ImageView_getRenderFile(JSContext *cx, uint32_t argc, jsval
bool js_cocos2dx_ui_ImageView_getCapInsets(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_isScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_ImageView(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_Text_class;
@ -346,7 +341,6 @@ bool js_cocos2dx_ui_Text_getTextVerticalAlignment(JSContext *cx, uint32_t argc,
bool js_cocos2dx_ui_Text_getTextAreaSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Text_setTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Text_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Text_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Text_Text(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_TextAtlas_class;
@ -363,7 +357,6 @@ bool js_cocos2dx_ui_TextAtlas_getRenderFile(JSContext *cx, uint32_t argc, jsval
bool js_cocos2dx_ui_TextAtlas_setProperty(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextAtlas_adaptRenderers(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextAtlas_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextAtlas_TextAtlas(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_LoadingBar_class;
@ -384,7 +377,6 @@ bool js_cocos2dx_ui_LoadingBar_getCapInsets(JSContext *cx, uint32_t argc, jsval
bool js_cocos2dx_ui_LoadingBar_isScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_LoadingBar_getPercent(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_LoadingBar_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_LoadingBar_LoadingBar(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_ScrollView_class;
@ -446,7 +438,6 @@ bool js_cocos2dx_ui_ScrollView_isScrollBarAutoHideEnabled(JSContext *cx, uint32_
bool js_cocos2dx_ui_ScrollView_jumpToRight(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ScrollView_scrollToTopRight(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ScrollView_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ScrollView_ScrollView(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_ListView_class;
@ -487,7 +478,6 @@ bool js_cocos2dx_ui_ListView_getClosestItemToPositionInCurrentView(JSContext *cx
bool js_cocos2dx_ui_ListView_setItemModel(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_insertCustomItem(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_ListView(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_Slider_class;
@ -523,7 +513,6 @@ bool js_cocos2dx_ui_Slider_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp)
bool js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Slider_setZoomScale(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Slider_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Slider_Slider(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_UICCTextField_class;
@ -610,7 +599,6 @@ bool js_cocos2dx_ui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *
bool js_cocos2dx_ui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextField_getTouchSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextField_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextField_TextField(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_TextBMFont_class;
@ -626,7 +614,6 @@ bool js_cocos2dx_ui_TextBMFont_setString(JSContext *cx, uint32_t argc, jsval *vp
bool js_cocos2dx_ui_TextBMFont_getRenderFile(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextBMFont_setFntFile(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextBMFont_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_TextBMFont_TextBMFont(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_PageView_class;
@ -657,7 +644,6 @@ bool js_cocos2dx_ui_PageView_getIndicatorSpaceBetweenIndexNodes(JSContext *cx, u
bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_PageView_createInstance(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_PageView_PageView(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_ui_Helper_class;

View File

@ -1589,32 +1589,40 @@ bool ScriptingCore::isObjectValid(JSContext *cx, uint32_t argc, jsval *vp)
void ScriptingCore::rootObject(Ref* ref)
{
// js_proxy_t* nproxy;
// js_proxy_t* jsproxy;
// void *ptr = (void*)ref;
// nproxy = jsb_get_native_proxy(ptr);
// if (nproxy) {
// JSContext *cx = getGlobalContext();
// jsproxy = jsb_get_js_proxy(nproxy->obj);
// AddObjectRoot(cx, &jsproxy->obj);
//
// CCLOG("Rooting %p - %p: %s", ref, &jsproxy->obj, typeid(*ref).name());
// }
js_proxy_t* nproxy;
js_proxy_t* jsproxy;
void *ptr = (void*)ref;
nproxy = jsb_get_native_proxy(ptr);
if (nproxy) {
JSContext *cx = getGlobalContext();
// FIXME: Creating a RootedObject here is not needed.
// it is being created only because jsb_get_js_proxy() requires one
// but only the raw pointer is used in jsb_get_js_proxy()
JS::RootedObject handle(cx, nproxy->obj.get());
jsproxy = jsb_get_js_proxy(handle);
AddObjectRoot(cx, &jsproxy->obj);
CCLOG("Rooting %p - %p: %s", ref, &jsproxy->obj, typeid(*ref).name());
}
}
void ScriptingCore::unrootObject(Ref* ref)
{
// js_proxy_t* nproxy;
// js_proxy_t* jsproxy;
// void *ptr = (void*)ref;
// nproxy = jsb_get_native_proxy(ptr);
// if (nproxy) {
// JSContext *cx = getGlobalContext();
// jsproxy = jsb_get_js_proxy(nproxy->obj);
// RemoveObjectRoot(cx, &jsproxy->obj);
//
// CCLOG("Unrooting %p - %p: %s", ref, &jsproxy->obj, typeid(*ref).name());
// }
js_proxy_t* nproxy;
js_proxy_t* jsproxy;
void *ptr = (void*)ref;
nproxy = jsb_get_native_proxy(ptr);
if (nproxy) {
JSContext *cx = getGlobalContext();
// FIXME: Creating a RootedObject here is not needed.
// it is being created only because jsb_get_js_proxy() requires one
// but only the raw pointer is used in jsb_get_js_proxy()
JS::RootedObject handle(cx, nproxy->obj.get());
jsproxy = jsb_get_js_proxy(handle);
RemoveObjectRoot(cx, &jsproxy->obj);
CCLOG("Unrooting %p - %p: %s", ref, &jsproxy->obj, typeid(*ref).name());
}
}
#pragma mark - Debug
@ -1999,6 +2007,26 @@ JSObject* jsb_ref_create_jsobject(JSContext *cx, cocos2d::Ref *ref, js_type_clas
return js_obj;
}
JSObject* jsb_ref_autoreleased_create_jsobject(JSContext *cx, cocos2d::Ref *ref, js_type_class_t *typeClass, const char* debug)
{
// JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
JS::RootedObject proto(cx, typeClass->proto.ref());
JS::RootedObject parent(cx, typeClass->parentProto.ref());
JS::RootedObject js_obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent));
js_proxy_t* newproxy = jsb_new_proxy(ref, js_obj);
jsb_ref_autoreleased_init(cx, &newproxy->obj, ref, debug);
return js_obj;
}
JSObject* jsb_ref_get_or_create_jsobject(JSContext *cx, cocos2d::Ref *ref, js_type_class_t *typeClass, const char* debug)
{
auto proxy = jsb_get_native_proxy(ref);
if (proxy)
return proxy->obj;
// else
return jsb_ref_create_jsobject(cx, ref, typeClass, debug);
}
void jsb_ref_init(JSContext* cx, JS::Heap<JSObject*> *obj, Ref* ref, const char* debug)
{
// CCLOG("jsb_ref_init: JSObject address = %p. %s", obj->get(), debug);
@ -2012,6 +2040,21 @@ void jsb_ref_init(JSContext* cx, JS::Heap<JSObject*> *obj, Ref* ref, const char*
#endif
}
void jsb_ref_autoreleased_init(JSContext* cx, JS::Heap<JSObject*> *obj, Ref* ref, const char* debug)
{
// CCLOG("jsb_ref_init: JSObject address = %p. %s", obj->get(), debug);
#if CC_ENABLE_GC_FOR_NATIVE_OBJECTS
(void)cx;
(void)obj;
ref->_scriptOwned = true;
// retain it, since the object is autoreleased
ret->retain();
#else
// don't autorelease it, since it is already autoreleased
JS::AddNamedObjectRoot(cx, obj, debug);
#endif
}
void jsb_ref_finalize(JSFreeOp* fop, JSObject* obj)
{
#if CC_ENABLE_GC_FOR_NATIVE_OBJECTS

View File

@ -557,6 +557,14 @@ void jsb_remove_proxy(js_proxy_t* nativeProxy, js_proxy_t* jsProxy);
*/
void jsb_ref_init(JSContext* cx, JS::Heap<JSObject*> *obj, cocos2d::Ref* ref, const char* debug);
/**
* Generic initialization function for subclasses of Ref.
* Similar to jsb_ref_init(), but call it if you know that Ref has been autoreleased
* This function should never be called. It is only added as way to fix
* an issue with the static auto-bindings with the "create" function
*/
void jsb_ref_autoreleased_init(JSContext* cx, JS::Heap<JSObject*> *obj, cocos2d::Ref* ref, const char* debug);
/**
* Generic finalize used by objects that are subclass of Ref
*/
@ -573,6 +581,22 @@ void jsb_ref_rebind(JSContext* cx, JS::HandleObject jsobj, js_proxy_t *js2native
*/
JSObject* jsb_ref_create_jsobject(JSContext *cx, cocos2d::Ref *ref, js_type_class_t *typeClass, const char* debug);
/**
* Creates a new JSObject of a certain type (typeClass) and creates a proxy associated with and the Ref
* Similar to jsb_ref_create_jsobject(), but call it if you know that Ref has been autoreleased
* This function should never be called. It is only added as way to fix
* an issue with the static auto-bindings with the "create" function
*/
JSObject* jsb_ref_autoreleased_create_jsobject(JSContext *cx, cocos2d::Ref *ref, js_type_class_t *typeClass, const char* debug);
/**
It will try to get the associated JSObjct for ref.
If it can't find it, it will create a new one associating it to Ref
*/
JSObject* jsb_ref_get_or_create_jsobject(JSContext *cx, cocos2d::Ref *ref, js_type_class_t *typeClass, const char* debug);
template <class T>
jsval getJSObject(JSContext* cx, T* nativeObj)
{

View File

@ -338,24 +338,17 @@ bool js_cocos2dx_CCSequence_create(JSContext *cx, uint32_t argc, jsval *vp)
i++;
}
}
cocos2d::FiniteTimeAction* ret = cocos2d::Sequence::create(array);
jsval jsret;
do {
if (ret) {
js_proxy_t *p = jsb_get_native_proxy(ret);
if (p) {
jsret = OBJECT_TO_JSVAL(p->obj);
} else {
// create a new js obj of that class
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::FiniteTimeAction>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
}
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
auto ret = new (std::nothrow) cocos2d::Sequence;
auto ok = ret->init(array);
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Sequence>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::Sequence"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
}
JS_ReportError(cx, "wrong number of arguments");
return false;
@ -383,67 +376,55 @@ bool js_cocos2dx_CCSpawn_create(JSContext *cx, uint32_t argc, jsval *vp)
i++;
}
}
cocos2d::FiniteTimeAction* ret = cocos2d::Spawn::create(array);
jsval jsret;
do {
if (ret) {
js_proxy_t *p = jsb_get_native_proxy(ret);
if (p) {
jsret = OBJECT_TO_JSVAL(p->obj);
} else {
// create a new js obj of that class
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::FiniteTimeAction>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
}
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
auto ret = new (std::nothrow) cocos2d::Spawn;
auto ok = ret->init(array);
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Spawn>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::Spawn"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
}
JS_ReportError(cx, "wrong number of arguments");
return false;
}
// TODO: This function is deprecated. The new API is "new MenuItemToggle" instead of "MenuItemToggle.create"
// There are not js tests for this function. Impossible to know weather it works Ok.
bool js_cocos2dx_CCMenuItemToggle_create(JSContext *cx, uint32_t argc, jsval *vp)
{
if (argc >= 1) {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
cocos2d::MenuItemToggle* ret = cocos2d::MenuItemToggle::create();
cocos2d::MenuItemToggle* ret = new (std::nothrow) cocos2d::MenuItemToggle;
if (ret->initWithItem(nullptr))
{
for (uint32_t i=0; i < argc; i++) {
js_proxy_t *proxy;
JS::RootedObject tmpObj(cx, args.get(i).toObjectOrNull());
proxy = jsb_get_js_proxy(tmpObj);
cocos2d::MenuItem* item = (cocos2d::MenuItem*)(proxy ? proxy->ptr : NULL);
TEST_NATIVE_OBJECT(cx, item)
ret->addSubItem(item);
}
ret->setSelectedIndex(0);
jsval jsret;
if (ret) {
js_proxy_t *proxy = jsb_get_native_proxy(ret);
if (proxy) {
jsret = OBJECT_TO_JSVAL(proxy->obj);
} else {
// create a new js obj of that class
proxy = js_get_or_create_proxy<cocos2d::MenuItemToggle>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
for (uint32_t i=0; i < argc; i++) {
js_proxy_t *proxy;
JS::RootedObject tmpObj(cx, args.get(i).toObjectOrNull());
proxy = jsb_get_js_proxy(tmpObj);
cocos2d::MenuItem* item = (cocos2d::MenuItem*)(proxy ? proxy->ptr : NULL);
TEST_NATIVE_OBJECT(cx, item)
ret->addSubItem(item);
}
} else {
jsret = JSVAL_NULL;
ret->setSelectedIndex(0);
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::MenuItemToggle>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::MenuItemToggle"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "wrong number of arguments");
return false;
}
// TODO: This function is deprecated. The new API is "new Animation" instead of "Animation.create"
// There are not js tests for this function. Impossible to know weather it works Ok.
bool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp)
{
bool ok = true;
@ -451,7 +432,8 @@ bool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp)
if (argc <= 3) {
cocos2d::Animation* ret = nullptr;
double arg1 = 0.0f;
if (argc == 2) {
if (argc == 2)
{
Vector<SpriteFrame*> arg0;
if (argc > 0) {
ok &= jsval_to_ccvector(cx, args.get(0), &arg0);
@ -460,8 +442,11 @@ bool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp)
JS::RootedValue jsarg1(cx, args.get(1));
ok &= JS::ToNumber(cx, jsarg1, &arg1);
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
ret = cocos2d::Animation::createWithSpriteFrames(arg0, arg1);
} else if (argc == 3) {
ret = new (std::nothrow) cocos2d::Animation;
ok &= ret->initWithSpriteFrames(arg0, arg1);
}
else if (argc == 3)
{
Vector<AnimationFrame*> arg0;
if (argc > 0) {
ok &= jsval_to_ccvector(cx, args.get(0), &arg0);
@ -472,32 +457,33 @@ bool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp)
ok &= JS::ToNumber(cx, jsarg1, &arg1);
ok &= jsval_to_uint32(cx, args.get(2), &loops);
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
ret = cocos2d::Animation::create(arg0, arg1, loops);
} else if (argc == 1) {
ret = new (std::nothrow) cocos2d::Animation;
ok &= ret->initWithAnimationFrames(arg0, arg1, loops);
}
else if (argc == 1)
{
Vector<SpriteFrame*> arg0;
if (argc > 0) {
ok &= jsval_to_ccvector(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
}
ret = cocos2d::Animation::createWithSpriteFrames(arg0);
} else if (argc == 0) {
ret = cocos2d::Animation::create();
ret = new (std::nothrow) cocos2d::Animation;
ok &= ret->initWithSpriteFrames(arg0);
}
jsval jsret;
if (ret) {
js_proxy_t *proxy = jsb_get_native_proxy(ret);
if (proxy) {
jsret = OBJECT_TO_JSVAL(proxy->obj);
} else {
// create a new js obj of that class
proxy = js_get_or_create_proxy<cocos2d::Animation>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
}
} else {
jsret = JSVAL_NULL;
else if (argc == 0)
{
ret = new (std::nothrow) cocos2d::Animation;
ok = ret->init();
}
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Animation>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::Animation"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "wrong number of arguments");
return false;
@ -522,6 +508,8 @@ bool js_cocos2dx_CCScene_init(JSContext *cx, uint32_t argc, jsval *vp)
return false;
}
// TODO: This function is deprecated. The new API is "new LayerMultiplex" instead of "LayerMultiplex.create"
// There are not js tests for this function. Impossible to know weather it works Ok.
bool js_cocos2dx_CCLayerMultiplex_create(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -530,18 +518,18 @@ bool js_cocos2dx_CCLayerMultiplex_create(JSContext *cx, uint32_t argc, jsval *vp
ok &= jsvals_variadic_to_ccvector(cx, args, &arg0);
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
cocos2d::LayerMultiplex* ret = cocos2d::LayerMultiplex::createWithArray(arg0);
jsval jsret;
do {
if (ret) {
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::LayerMultiplex>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
cocos2d::LayerMultiplex* ret = new (std::nothrow) cocos2d::LayerMultiplex;
ok &= ret->initWithArray(arg0);
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::LayerMultiplex>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::LayerMultiplex"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
JS_ReportError(cx, "Error creating LayerMultiplex");
return false;
}
bool js_cocos2dx_JSTouchDelegate_registerStandardDelegate(JSContext *cx, uint32_t argc, jsval *vp)
@ -690,8 +678,9 @@ static bool js_callFunc(JSContext *cx, uint32_t argc, jsval *vp)
JS::RootedValue data(cx, args.get(2));
tmpCobj->setJSExtraData(data);
}
CallFuncN *ret = CallFuncN::create([=](Node* sender){
cocos2d::CallFuncN *ret = new (std::nothrow) cocos2d::CallFuncN;
bool ok = ret->initWithFunction([=](Node* sender){
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
JS::RootedValue jsvalThis(cx, tmpCobj->getJSCallbackThis());
@ -702,8 +691,9 @@ static bool js_callFunc(JSContext *cx, uint32_t argc, jsval *vp)
JS::RootedValue senderVal(cx);
if (sender)
{
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::Node>(cx, sender);
senderVal.set(OBJECT_TO_JSVAL(proxy->obj));
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Node>(sender);
auto jsobj = jsb_ref_get_or_create_jsobject(cx, sender, typeClass, "cocos2d::Node");
senderVal.set(OBJECT_TO_JSVAL(jsobj));
}
else
{
@ -723,12 +713,17 @@ static bool js_callFunc(JSContext *cx, uint32_t argc, jsval *vp)
}
});
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::CallFunc>(cx, ret);
args.rval().set(OBJECT_TO_JSVAL(proxy->obj));
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::CallFuncN>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::CallFuncN"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
return true;
}
JS_ReportError(cx, "Invalid number of arguments");
JS_ReportError(cx, "js_callFunc: Invalid number of arguments");
return false;
}
@ -767,8 +762,9 @@ bool js_cocos2dx_CallFunc_initWithFunction(JSContext *cx, uint32_t argc, jsval *
JS::RootedValue senderVal(cx);
if (sender)
{
js_proxy_t *senderProxy = js_get_or_create_proxy<cocos2d::Node>(cx, sender);
senderVal.set(OBJECT_TO_JSVAL(senderProxy->obj));
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::Node>(sender);
auto jsobj = jsb_ref_get_or_create_jsobject(cx, sender, typeClass, "cocos2d::Node");
senderVal.set(OBJECT_TO_JSVAL(jsobj));
}
else
{
@ -4258,8 +4254,6 @@ bool js_cocos2dx_CCGLProgram_setUniformLocationWith4f(JSContext *cx, uint32_t ar
args.rval().setUndefined();
return true;
JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 5);
return false;
}
bool js_cocos2dx_CCGLProgram_setUniformLocationWithMatrixfvUnion(JSContext *cx, uint32_t argc, jsval *vp)
@ -4318,32 +4312,23 @@ bool js_cocos2dx_CCGLProgram_create(JSContext *cx, uint32_t argc, jsval *vp)
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
std::string arg1_tmp; ok &= jsval_to_std_string(cx, args.get(1), &arg1_tmp); arg1 = arg1_tmp.c_str();
GLProgram* ret = new GLProgram();
ret->autorelease();
GLProgram* ret = new (std::nothrow) cocos2d::GLProgram;
ok = ret->initWithFilenames(arg0, arg1);
ret->initWithFilenames(arg0, arg1);
jsval jsret;
do {
if (ret) {
js_proxy_t *p = jsb_get_native_proxy(ret);
if (p) {
jsret = OBJECT_TO_JSVAL(p->obj);
} else {
// create a new js obj of that class
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::GLProgram>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
}
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::GLProgram>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::GLProgram"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
JS_ReportError(cx, "Error creating GLProgram");
return false;
}
// TODO: This function doesn't have test. I was impossible to test it
bool js_cocos2dx_CCGLProgram_createWithString(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -4357,25 +4342,17 @@ bool js_cocos2dx_CCGLProgram_createWithString(JSContext *cx, uint32_t argc, jsva
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
std::string arg1_tmp; ok &= jsval_to_std_string(cx, args.get(1), &arg1_tmp); arg1 = arg1_tmp.c_str();
GLProgram* ret = new GLProgram();
ret->initWithByteArrays(arg0, arg1);
GLProgram* ret = new (std::nothrow) GLProgram;
ok = ret->initWithByteArrays(arg0, arg1);
jsval jsret;
do {
if (ret) {
js_proxy_t *p = jsb_get_native_proxy(ret);
if (p) {
jsret = OBJECT_TO_JSVAL(p->obj);
} else {
// create a new js obj of that class
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::GLProgram>(cx, ret);
jsret = OBJECT_TO_JSVAL(proxy->obj);
}
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
if (ok)
{
js_type_class_t *typeClass = js_get_type_from_native<cocos2d::GLProgram>(ret);
// link the native object with the javascript object
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, ret, typeClass, "cocos2d::GLProgram"));
args.rval().set(OBJECT_TO_JSVAL(jsobj));
return true;
}
return true;
}

View File

@ -27,7 +27,7 @@
#include "js_manual_conversions.h"
#include "cocos2d_specifics.hpp"
#include "math/TransformUtils.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
USING_NS_CC;

View File

@ -59,6 +59,12 @@
-- @param self
-- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
--
-- @function [parent=#Camera] isBrushValid
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Get object depth towards camera
-- @function [parent=#Camera] getDepthInView

View File

@ -24,6 +24,12 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#CameraBackgroundBrush] isValid
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Creates a Skybox brush with 6 textures.<br>
-- param positive_x texture for the right side of the texture cube face.<br>

View File

@ -4,6 +4,13 @@
-- @extend CameraBackgroundBrush
-- @parent_module cc
--------------------------------
--
-- @function [parent=#CameraBackgroundSkyBoxBrush] setTextureValid
-- @param self
-- @param #bool valid
-- @return CameraBackgroundSkyBoxBrush#CameraBackgroundSkyBoxBrush self (return value: cc.CameraBackgroundSkyBoxBrush)
--------------------------------
-- Set skybox texture <br>
-- param texture Skybox texture
@ -12,6 +19,19 @@
-- @param #cc.TextureCube texture
-- @return CameraBackgroundSkyBoxBrush#CameraBackgroundSkyBoxBrush self (return value: cc.CameraBackgroundSkyBoxBrush)
--------------------------------
--
-- @function [parent=#CameraBackgroundSkyBoxBrush] setActived
-- @param self
-- @param #bool actived
-- @return CameraBackgroundSkyBoxBrush#CameraBackgroundSkyBoxBrush self (return value: cc.CameraBackgroundSkyBoxBrush)
--------------------------------
--
-- @function [parent=#CameraBackgroundSkyBoxBrush] isActived
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @overload self
-- @overload self, string, string, string, string, string, string
@ -45,6 +65,12 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#CameraBackgroundSkyBoxBrush] isValid
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#CameraBackgroundSkyBoxBrush] CameraBackgroundSkyBoxBrush

View File

@ -185,6 +185,12 @@
-- @param #color4f_table color
-- @return DrawNode#DrawNode self (return value: cc.DrawNode)
--------------------------------
--
-- @function [parent=#DrawNode] getLineWidth
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Draw a point.<br>
-- param point A Vec2 used to point.<br>

View File

@ -380,6 +380,12 @@
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function [parent=#ParticleSystem] getResourceFile
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- Gets the number of degrees to rotate a particle around the source pos per second.<br>
-- return The number of degrees to rotate a particle around the source pos per second.

View File

@ -42,6 +42,12 @@
-- @param #bool flippedX
-- @return Sprite#Sprite self (return value: cc.Sprite)
--------------------------------
-- / @}
-- @function [parent=#Sprite] getResourceType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @overload self, cc.Texture2D, rect_table
-- @overload self, cc.Texture2D
@ -152,6 +158,12 @@
-- @param self
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
--------------------------------
--
-- @function [parent=#Sprite] getResourceName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- Whether or not the Sprite needs to be updated in the Atlas.<br>
-- return True if the sprite needs to be updated in the Atlas, false otherwise.

View File

@ -4,6 +4,13 @@
-- @extend Ref
-- @parent_module cc
--------------------------------
--
-- @function [parent=#SpriteFrameCache] reloadTexture
-- @param self
-- @param #string plist
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames. <br>
-- js NA<br>

View File

@ -130,6 +130,12 @@
-- @param self
-- @return map_table#map_table ret (return value: map_table)
--------------------------------
--
-- @function [parent=#TMXMapInfo] getExternalTilesetFileName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @overload self
-- @overload self

View File

@ -50736,6 +50736,53 @@ int lua_cocos2dx_DrawNode_drawSolidRect(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_DrawNode_getLineWidth(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* 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.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_getLineWidth'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_DrawNode_getLineWidth'", nullptr);
return 0;
}
double ret = cobj->getLineWidth();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:getLineWidth",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_getLineWidth'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawPoint(lua_State* tolua_S)
{
int argc = 0;
@ -50883,6 +50930,19 @@ int lua_cocos2dx_DrawNode_create(lua_State* tolua_S)
object_to_luaval<cocos2d::DrawNode>(tolua_S, "cc.DrawNode",(cocos2d::DrawNode*)ret);
return 1;
}
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.DrawNode:create");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_DrawNode_create'", nullptr);
return 0;
}
cocos2d::DrawNode* ret = cocos2d::DrawNode::create(arg0);
object_to_luaval<cocos2d::DrawNode>(tolua_S, "cc.DrawNode",(cocos2d::DrawNode*)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.DrawNode:create",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
@ -50918,6 +50978,23 @@ int lua_cocos2dx_DrawNode_constructor(lua_State* tolua_S)
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.DrawNode");
return 1;
}
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.DrawNode:DrawNode");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_DrawNode_constructor'", nullptr);
return 0;
}
cobj = new cocos2d::DrawNode(arg0);
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.DrawNode");
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:DrawNode",argc, 0);
return 0;
@ -50957,6 +51034,7 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S)
tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_DrawNode_setBlendFunc);
tolua_function(tolua_S,"clear",lua_cocos2dx_DrawNode_clear);
tolua_function(tolua_S,"drawSolidRect",lua_cocos2dx_DrawNode_drawSolidRect);
tolua_function(tolua_S,"getLineWidth",lua_cocos2dx_DrawNode_getLineWidth);
tolua_function(tolua_S,"drawPoint",lua_cocos2dx_DrawNode_drawPoint);
tolua_function(tolua_S,"drawCubicBezier",lua_cocos2dx_DrawNode_drawCubicBezier);
tolua_function(tolua_S,"create", lua_cocos2dx_DrawNode_create);
@ -63953,6 +64031,53 @@ int lua_cocos2dx_ParticleSystem_getStartSpin(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ParticleSystem_getResourceFile(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ParticleSystem* 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.ParticleSystem",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ParticleSystem*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ParticleSystem_getResourceFile'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleSystem_getResourceFile'", nullptr);
return 0;
}
const std::string ret = cobj->getResourceFile();
tolua_pushcppstring(tolua_S,ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParticleSystem:getResourceFile",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParticleSystem_getResourceFile'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ParticleSystem_getRotatePerSecond(lua_State* tolua_S)
{
int argc = 0;
@ -66413,6 +66538,7 @@ int lua_register_cocos2dx_ParticleSystem(lua_State* tolua_S)
tolua_function(tolua_S,"setStartSize",lua_cocos2dx_ParticleSystem_setStartSize);
tolua_function(tolua_S,"setSpeed",lua_cocos2dx_ParticleSystem_setSpeed);
tolua_function(tolua_S,"getStartSpin",lua_cocos2dx_ParticleSystem_getStartSpin);
tolua_function(tolua_S,"getResourceFile",lua_cocos2dx_ParticleSystem_getResourceFile);
tolua_function(tolua_S,"getRotatePerSecond",lua_cocos2dx_ParticleSystem_getRotatePerSecond);
tolua_function(tolua_S,"setEmitterMode",lua_cocos2dx_ParticleSystem_setEmitterMode);
tolua_function(tolua_S,"getDuration",lua_cocos2dx_ParticleSystem_getDuration);
@ -70844,6 +70970,53 @@ int lua_cocos2dx_Sprite_setFlippedX(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Sprite_getResourceType(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Sprite* 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.Sprite",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getResourceType'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_getResourceType'", nullptr);
return 0;
}
const int ret = cobj->getResourceType();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getResourceType",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getResourceType'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Sprite_initWithTexture(lua_State* tolua_S)
{
int argc = 0;
@ -71524,6 +71697,53 @@ int lua_cocos2dx_Sprite_getSpriteFrame(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Sprite_getResourceName(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Sprite* 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.Sprite",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Sprite*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite_getResourceName'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_getResourceName'", nullptr);
return 0;
}
const std::string ret = cobj->getResourceName();
tolua_pushcppstring(tolua_S,ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite:getResourceName",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite_getResourceName'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Sprite_isDirty(lua_State* tolua_S)
{
int argc = 0;
@ -72312,6 +72532,7 @@ int lua_register_cocos2dx_Sprite(lua_State* tolua_S)
tolua_function(tolua_S,"getTexture",lua_cocos2dx_Sprite_getTexture);
tolua_function(tolua_S,"setFlippedY",lua_cocos2dx_Sprite_setFlippedY);
tolua_function(tolua_S,"setFlippedX",lua_cocos2dx_Sprite_setFlippedX);
tolua_function(tolua_S,"getResourceType",lua_cocos2dx_Sprite_getResourceType);
tolua_function(tolua_S,"initWithTexture",lua_cocos2dx_Sprite_initWithTexture);
tolua_function(tolua_S,"getBatchNode",lua_cocos2dx_Sprite_getBatchNode);
tolua_function(tolua_S,"getOffsetPosition",lua_cocos2dx_Sprite_getOffsetPosition);
@ -72325,6 +72546,7 @@ int lua_register_cocos2dx_Sprite(lua_State* tolua_S)
tolua_function(tolua_S,"setDisplayFrameWithAnimationName",lua_cocos2dx_Sprite_setDisplayFrameWithAnimationName);
tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_Sprite_setTextureAtlas);
tolua_function(tolua_S,"getSpriteFrame",lua_cocos2dx_Sprite_getSpriteFrame);
tolua_function(tolua_S,"getResourceName",lua_cocos2dx_Sprite_getResourceName);
tolua_function(tolua_S,"isDirty",lua_cocos2dx_Sprite_isDirty);
tolua_function(tolua_S,"setAtlasIndex",lua_cocos2dx_Sprite_setAtlasIndex);
tolua_function(tolua_S,"setDirty",lua_cocos2dx_Sprite_setDirty);
@ -78936,6 +79158,53 @@ int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Camera_isBrushValid(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_isBrushValid'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isBrushValid'", nullptr);
return 0;
}
bool ret = cobj->isBrushValid();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:isBrushValid",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_isBrushValid'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Camera_getDepthInView(lua_State* tolua_S)
{
int argc = 0;
@ -80340,6 +80609,7 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S)
tolua_function(tolua_S,"apply",lua_cocos2dx_Camera_apply);
tolua_function(tolua_S,"getBackgroundBrush",lua_cocos2dx_Camera_getBackgroundBrush);
tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix);
tolua_function(tolua_S,"isBrushValid",lua_cocos2dx_Camera_isBrushValid);
tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView);
tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground);
tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection);
@ -80520,6 +80790,53 @@ int lua_cocos2dx_CameraBackgroundBrush_init(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_CameraBackgroundBrush_isValid(lua_State* tolua_S)
{
int argc = 0;
cocos2d::CameraBackgroundBrush* 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.CameraBackgroundBrush",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::CameraBackgroundBrush*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CameraBackgroundBrush_isValid'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CameraBackgroundBrush_isValid'", nullptr);
return 0;
}
bool ret = cobj->isValid();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CameraBackgroundBrush:isValid",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CameraBackgroundBrush_isValid'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_CameraBackgroundBrush_createSkyboxBrush(lua_State* tolua_S)
{
int argc = 0;
@ -80738,6 +81055,7 @@ int lua_register_cocos2dx_CameraBackgroundBrush(lua_State* tolua_S)
tolua_function(tolua_S,"getBrushType",lua_cocos2dx_CameraBackgroundBrush_getBrushType);
tolua_function(tolua_S,"drawBackground",lua_cocos2dx_CameraBackgroundBrush_drawBackground);
tolua_function(tolua_S,"init",lua_cocos2dx_CameraBackgroundBrush_init);
tolua_function(tolua_S,"isValid",lua_cocos2dx_CameraBackgroundBrush_isValid);
tolua_function(tolua_S,"createSkyboxBrush", lua_cocos2dx_CameraBackgroundBrush_createSkyboxBrush);
tolua_function(tolua_S,"createColorBrush", lua_cocos2dx_CameraBackgroundBrush_createColorBrush);
tolua_function(tolua_S,"createNoneBrush", lua_cocos2dx_CameraBackgroundBrush_createNoneBrush);
@ -81041,6 +81359,56 @@ int lua_register_cocos2dx_CameraBackgroundColorBrush(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTextureValid(lua_State* tolua_S)
{
int argc = 0;
cocos2d::CameraBackgroundSkyBoxBrush* 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.CameraBackgroundSkyBoxBrush",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::CameraBackgroundSkyBoxBrush*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTextureValid'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
bool arg0;
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.CameraBackgroundSkyBoxBrush:setTextureValid");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTextureValid'", nullptr);
return 0;
}
cobj->setTextureValid(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CameraBackgroundSkyBoxBrush:setTextureValid",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTextureValid'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTexture(lua_State* tolua_S)
{
int argc = 0;
@ -81091,6 +81459,103 @@ int lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTexture(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_CameraBackgroundSkyBoxBrush_setActived(lua_State* tolua_S)
{
int argc = 0;
cocos2d::CameraBackgroundSkyBoxBrush* 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.CameraBackgroundSkyBoxBrush",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::CameraBackgroundSkyBoxBrush*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_setActived'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
bool arg0;
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.CameraBackgroundSkyBoxBrush:setActived");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_setActived'", nullptr);
return 0;
}
cobj->setActived(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CameraBackgroundSkyBoxBrush:setActived",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_setActived'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_CameraBackgroundSkyBoxBrush_isActived(lua_State* tolua_S)
{
int argc = 0;
cocos2d::CameraBackgroundSkyBoxBrush* 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.CameraBackgroundSkyBoxBrush",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::CameraBackgroundSkyBoxBrush*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_isActived'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_isActived'", nullptr);
return 0;
}
bool ret = cobj->isActived();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.CameraBackgroundSkyBoxBrush:isActived",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CameraBackgroundSkyBoxBrush_isActived'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_CameraBackgroundSkyBoxBrush_create(lua_State* tolua_S)
{
int argc = 0;
@ -81201,7 +81666,10 @@ int lua_register_cocos2dx_CameraBackgroundSkyBoxBrush(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"CameraBackgroundSkyBoxBrush");
tolua_function(tolua_S,"new",lua_cocos2dx_CameraBackgroundSkyBoxBrush_constructor);
tolua_function(tolua_S,"setTextureValid",lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTextureValid);
tolua_function(tolua_S,"setTexture",lua_cocos2dx_CameraBackgroundSkyBoxBrush_setTexture);
tolua_function(tolua_S,"setActived",lua_cocos2dx_CameraBackgroundSkyBoxBrush_setActived);
tolua_function(tolua_S,"isActived",lua_cocos2dx_CameraBackgroundSkyBoxBrush_isActived);
tolua_function(tolua_S,"create", lua_cocos2dx_CameraBackgroundSkyBoxBrush_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::CameraBackgroundSkyBoxBrush).name();
@ -90576,6 +91044,56 @@ int lua_register_cocos2dx_SpriteBatchNode(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_SpriteFrameCache_reloadTexture(lua_State* tolua_S)
{
int argc = 0;
cocos2d::SpriteFrameCache* 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.SpriteFrameCache",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::SpriteFrameCache*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_SpriteFrameCache_reloadTexture'", 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, "cc.SpriteFrameCache:reloadTexture");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteFrameCache_reloadTexture'", nullptr);
return 0;
}
bool ret = cobj->reloadTexture(arg0);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.SpriteFrameCache:reloadTexture",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpriteFrameCache_reloadTexture'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent(lua_State* tolua_S)
{
int argc = 0;
@ -91278,6 +91796,7 @@ int lua_register_cocos2dx_SpriteFrameCache(lua_State* tolua_S)
tolua_cclass(tolua_S,"SpriteFrameCache","cc.SpriteFrameCache","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"SpriteFrameCache");
tolua_function(tolua_S,"reloadTexture",lua_cocos2dx_SpriteFrameCache_reloadTexture);
tolua_function(tolua_S,"addSpriteFramesWithFileContent",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent);
tolua_function(tolua_S,"addSpriteFrame",lua_cocos2dx_SpriteFrameCache_addSpriteFrame);
tolua_function(tolua_S,"addSpriteFrames",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile);
@ -93247,6 +93766,53 @@ int lua_cocos2dx_TMXMapInfo_getTileProperties(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_TMXMapInfo_getExternalTilesetFileName(lua_State* tolua_S)
{
int argc = 0;
cocos2d::TMXMapInfo* 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.TMXMapInfo",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::TMXMapInfo*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXMapInfo_getExternalTilesetFileName'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXMapInfo_getExternalTilesetFileName'", nullptr);
return 0;
}
const std::string& ret = cobj->getExternalTilesetFileName();
tolua_pushcppstring(tolua_S,ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXMapInfo:getExternalTilesetFileName",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXMapInfo_getExternalTilesetFileName'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_TMXMapInfo_getObjectGroups(lua_State* tolua_S)
{
int argc = 0;
@ -94025,6 +94591,7 @@ int lua_register_cocos2dx_TMXMapInfo(lua_State* tolua_S)
tolua_function(tolua_S,"getLayerAttribs",lua_cocos2dx_TMXMapInfo_getLayerAttribs);
tolua_function(tolua_S,"getTileSize",lua_cocos2dx_TMXMapInfo_getTileSize);
tolua_function(tolua_S,"getTileProperties",lua_cocos2dx_TMXMapInfo_getTileProperties);
tolua_function(tolua_S,"getExternalTilesetFileName",lua_cocos2dx_TMXMapInfo_getExternalTilesetFileName);
tolua_function(tolua_S,"getObjectGroups",lua_cocos2dx_TMXMapInfo_getObjectGroups);
tolua_function(tolua_S,"getTMXFileName",lua_cocos2dx_TMXMapInfo_getTMXFileName);
tolua_function(tolua_S,"setCurrentString",lua_cocos2dx_TMXMapInfo_setCurrentString);
@ -95264,6 +95831,53 @@ int lua_cocos2dx_TMXTiledMap_getProperty(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_TMXTiledMap_getLayerNum(lua_State* tolua_S)
{
int argc = 0;
cocos2d::TMXTiledMap* 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.TMXTiledMap",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXTiledMap_getLayerNum'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_getLayerNum'", nullptr);
return 0;
}
int ret = cobj->getLayerNum();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getLayerNum",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_getLayerNum'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_TMXTiledMap_setMapSize(lua_State* tolua_S)
{
int argc = 0;
@ -95411,7 +96025,7 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroups(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_TMXTiledMap_initWithXML(lua_State* tolua_S)
int lua_cocos2dx_TMXTiledMap_getResourceFile(lua_State* tolua_S)
{
int argc = 0;
cocos2d::TMXTiledMap* cobj = nullptr;
@ -95431,35 +96045,29 @@ int lua_cocos2dx_TMXTiledMap_initWithXML(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXTiledMap_initWithXML'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXTiledMap_getResourceFile'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
if (argc == 0)
{
std::string arg0;
std::string arg1;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:initWithXML");
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TMXTiledMap:initWithXML");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_initWithXML'", nullptr);
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_getResourceFile'", nullptr);
return 0;
}
bool ret = cobj->initWithXML(arg0, arg1);
tolua_pushboolean(tolua_S,(bool)ret);
const std::string ret = cobj->getResourceFile();
tolua_pushcppstring(tolua_S,ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:initWithXML",argc, 2);
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getResourceFile",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_initWithXML'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_getResourceFile'.",&tolua_err);
#endif
return 0;
@ -95608,6 +96216,59 @@ int lua_cocos2dx_TMXTiledMap_getMapSize(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_TMXTiledMap_initWithXML(lua_State* tolua_S)
{
int argc = 0;
cocos2d::TMXTiledMap* 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.TMXTiledMap",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXTiledMap_initWithXML'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
std::string arg0;
std::string arg1;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:initWithXML");
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TMXTiledMap:initWithXML");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_initWithXML'", nullptr);
return 0;
}
bool ret = cobj->initWithXML(arg0, arg1);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:initWithXML",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_initWithXML'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_TMXTiledMap_getProperties(lua_State* tolua_S)
{
int argc = 0;
@ -96028,13 +96689,15 @@ int lua_register_cocos2dx_TMXTiledMap(lua_State* tolua_S)
tolua_function(tolua_S,"new",lua_cocos2dx_TMXTiledMap_constructor);
tolua_function(tolua_S,"setObjectGroups",lua_cocos2dx_TMXTiledMap_setObjectGroups);
tolua_function(tolua_S,"getProperty",lua_cocos2dx_TMXTiledMap_getProperty);
tolua_function(tolua_S,"getLayerNum",lua_cocos2dx_TMXTiledMap_getLayerNum);
tolua_function(tolua_S,"setMapSize",lua_cocos2dx_TMXTiledMap_setMapSize);
tolua_function(tolua_S,"getObjectGroup",lua_cocos2dx_TMXTiledMap_getObjectGroup);
tolua_function(tolua_S,"getObjectGroups",lua_cocos2dx_TMXTiledMap_getObjectGroups);
tolua_function(tolua_S,"initWithXML",lua_cocos2dx_TMXTiledMap_initWithXML);
tolua_function(tolua_S,"getResourceFile",lua_cocos2dx_TMXTiledMap_getResourceFile);
tolua_function(tolua_S,"initWithTMXFile",lua_cocos2dx_TMXTiledMap_initWithTMXFile);
tolua_function(tolua_S,"getTileSize",lua_cocos2dx_TMXTiledMap_getTileSize);
tolua_function(tolua_S,"getMapSize",lua_cocos2dx_TMXTiledMap_getMapSize);
tolua_function(tolua_S,"initWithXML",lua_cocos2dx_TMXTiledMap_initWithXML);
tolua_function(tolua_S,"getProperties",lua_cocos2dx_TMXTiledMap_getProperties);
tolua_function(tolua_S,"setTileSize",lua_cocos2dx_TMXTiledMap_setTileSize);
tolua_function(tolua_S,"setProperties",lua_cocos2dx_TMXTiledMap_setProperties);

View File

@ -2150,6 +2150,19 @@ int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -31,6 +31,7 @@ extern "C" {
#include "tolua_fix.h"
#include "cocos2d.h"
#include "Lua-BindingsExport.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
using namespace cocos2d;

View File

@ -57,7 +57,7 @@ THE SOFTWARE.
#include "ui/UIScale9Sprite.h"
#include "ui/UIEditBox/UIEditBox.h"
#include "ui/UILayoutComponent.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
/**
* @addtogroup ui

View File

@ -24,7 +24,7 @@ THE SOFTWARE.
#include "ui/UIAbstractCheckButton.h"
#include "2d/CCSprite.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -30,7 +30,7 @@ THE SOFTWARE.
#include "platform/CCFileUtils.h"
#include "ui/UIHelper.h"
#include <algorithm>
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#include "ui/UIScale9Sprite.h"
#include "ui/UIHelper.h"
#include "2d/CCSprite.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -38,7 +38,7 @@ THE SOFTWARE.
#include "2d/CCSprite.h"
#include "base/CCEventFocus.h"
#include "base/CCStencilStateManager.hpp"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#include "ui/UIHelper.h"
#include "ui/UIScale9Sprite.h"
#include "2d/CCSprite.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#include "ui/UIHelper.h"
#include "2d/CCSprite.h"
#include "2d/CCCamera.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -24,7 +24,7 @@ THE SOFTWARE.
#include "ui/UITextAtlas.h"
#include "2d/CCLabel.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

View File

@ -24,7 +24,7 @@ THE SOFTWARE.
#include "ui/UITextBMFont.h"
#include "2d/CCLabel.h"
#include "2d/CocosStudioExtension.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
NS_CC_BEGIN

2
plugin

@ -1 +1 @@
Subproject commit ad539b56c5354c1083f479d4c8d275ae8c7fdfa7
Subproject commit 4b68a78781f57c3cda70fcebb2a9066914d28efb

View File

@ -187,7 +187,6 @@
"cocos/2d/CCTweenFunction.cpp",
"cocos/2d/CCTweenFunction.h",
"cocos/2d/CMakeLists.txt",
"cocos/2d/CocosStudioExtension.h",
"cocos/2d/cocos2d.def",
"cocos/2d/cocos2d_headers.props",
"cocos/2d/cocos2dx.props",
@ -620,6 +619,8 @@
"cocos/editor-support/cocostudio/CocoStudio.cpp",
"cocos/editor-support/cocostudio/CocoStudio.h",
"cocos/editor-support/cocostudio/CocosStudioExport.h",
"cocos/editor-support/cocostudio/CocosStudioExtension.cpp",
"cocos/editor-support/cocostudio/CocosStudioExtension.h",
"cocos/editor-support/cocostudio/DictionaryHelper.cpp",
"cocos/editor-support/cocostudio/DictionaryHelper.h",
"cocos/editor-support/cocostudio/FlatBuffersSerialize.cpp",

View File

@ -170,6 +170,12 @@ CSSceneSkyBoxTest::CSSceneSkyBoxTest()
addChild(node);
_camera = static_cast<Camera*>(node->getChildByName("UserCamera_0"));
CameraBackgroundSkyBoxBrush * brush = dynamic_cast<CameraBackgroundSkyBoxBrush *>(_camera->getBackgroundBrush());
if (nullptr != brush)
{
CCLOG("CameraBackgroundSkyBoxBrush active value is : %s", brush->isActived() ? "true" : "false");
CCLOG("CameraBackgroundSkyBoxBrush valid value is : %s", brush->isValid() ? "true" : "false");
}
auto listener = EventListenerTouchAllAtOnce::create();
listener->onTouchesMoved = CC_CALLBACK_2(CSSceneSkyBoxTest::onTouchesMoved, this);

View File

@ -291,6 +291,12 @@ DrawNodeTest::DrawNodeTest()
for (int i = 0; i < 100; i++) {
draw->drawPoint(Vec2(i*7, 5), (float)i/5+1, Color4F(CCRANDOM_0_1(), CCRANDOM_0_1(), CCRANDOM_0_1(), 1));
}
auto draw1 = DrawNode::create();
this->addChild(draw1, 10);
draw1->setLineWidth(4);
draw1->drawLine(Vec2(0, s.height), Vec2(s.width, s.height - 20), Color4F::YELLOW);
draw1->drawLine(Vec2(0, 0), Vec2(s.width, s.height - 20), Color4F::YELLOW);
}
string DrawNodeTest::title() const

View File

@ -497,6 +497,10 @@ LabelFNTGlyphDesigner::LabelFNTGlyphDesigner()
addChild(layer, -10);
auto label1 = Label::createWithBMFont("fonts/futura-48.fnt", "Testing Glyph Designer");
// Demo for reloadFontAtlasFNT function, after it been called, all UI widget
// use the special font must reset font, because the old one is invalid.
FontAtlasCache::reloadFontAtlasFNT("fonts/futura-48.fnt");
label1->setBMFontFilePath("fonts/futura-48.fnt");
addChild(label1);
label1->setPosition(Vec2(winSize.width / 2, winSize.height * 0.4f));
@ -933,6 +937,10 @@ LabelTTFCJKWrappingTest::LabelTTFCJKWrappingTest()
label1->setPosition(Vec2(size.width * 0.1, size.height * 0.6));
label1->setAnchorPoint(Vec2(0, 0.5));
this->addChild(label1);
// Demo for unloadFontAtlasTTF function, after it been called, all UI widget
// use the special font must reset font, because the old one is invalid.
FontAtlasCache::unloadFontAtlasTTF("fonts/HKYuanMini.ttf");
label1->setTTFConfig(ttfConfig);
}
auto label2 = Label::createWithTTF(ttfConfig,

View File

@ -1,5 +1,6 @@
#include "ParticleTest.h"
#include "../testResource.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
USING_NS_CC;

View File

@ -361,6 +361,12 @@ SpriteBlur::~SpriteBlur()
SpriteBlur* SpriteBlur::create(const char *pszFileName)
{
SpriteBlur* pRet = new (std::nothrow) SpriteBlur();
if (pRet)
{
bool result = pRet->initWithFile("");
CCLOG("Test call Sprite::initWithFile with bad file name result is : %s", result ? "true" : "false");
}
if (pRet && pRet->initWithFile(pszFileName))
{
pRet->autorelease();

View File

@ -2443,6 +2443,8 @@ void CameraBackgroundClearTest::switch_CameraClearMode(cocos2d::Ref* sender)
{
_camera->setBackgroundBrush(CameraBackgroundBrush::createDepthBrush(1.f));
_label->setString("Depth Clear Brush");
// Test brush valid when set by user scene setting
CCLOG("Background brush valid status is : %s", _camera->isBrushValid() ? "true" : "false");
}
else if (type == CameraBackgroundBrush::BrushType::DEPTH)
{

View File

@ -27,6 +27,7 @@
#include <algorithm>
#include "../testResource.h"
#include "editor-support/cocostudio/CocosStudioExtension.h"
USING_NS_CC;
@ -1775,6 +1776,8 @@ void SpriteFrameAliasNameTest::onEnter()
auto animation = Animation::createWithSpriteFrames(animFrames, 0.3f);
// 14 frames * 1sec = 14 seconds
sprite->runAction(RepeatForever::create(Animate::create(animation)));
cache->reloadTexture("animations/grossini-aliases.plist");
}
void SpriteFrameAliasNameTest::onExit()

View File

@ -1,6 +1,7 @@
#include "TileMapTest.h"
#include "../testResource.h"
USING_NS_CC;
enum

@ -1 +1 @@
Subproject commit 76c1ae80aa78df9f35ad2cccd8fab9aa60cf68a6
Subproject commit 1054d94db6d97d99d67bac22baa1d3345e2d9d0f

View File

@ -87,8 +87,8 @@ skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserDat
Range::[*],
NotificationObserver::[*],
Image::[initWithString initWithImageData],
Sequence::[create],
Spawn::[create],
Sequence::[create init],
Spawn::[create init],
RotateTo::[calculateAngles],
GLProgram::[getProgram setUniformLocationWith(1|2|3|4)fv setUniformLocationWith(2|3|4)iv setUniformLocationWithMatrix(2|3|4)fv],
GLProgramState::[setUniformVec4 setVertexAttribPointer],

View File

@ -41,7 +41,7 @@ classes_need_extend = Layout Widget Button CheckBox ImageView Text TextAtlas Tex
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
# functions from all classes.
skip = *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType .*HSV onTouch.* onAcc.* onKey.* onRegisterTouchListener ccTouch.*],
skip = *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType .*HSV onTouch.* onAcc.* onKey.* onRegisterTouchListener ccTouch.* createInstance],
Widget::[(s|g)etUserObject],
Layer::[getInputManager],
LayoutParameter::[(s|g)etMargin],

View File

@ -139,19 +139,19 @@ def main():
tojs_root = '%s/tools/tojs' % project_root
output_dir = '%s/cocos/scripting/js-bindings/auto' % project_root
cmd_args = {'cocos2dx.ini' : ('cocos2d-x', 'jsb_cocos2dx_auto'), \
'cocos2dx_audioengine.ini' : ('cocos2dx_audioengine', 'jsb_cocos2dx_audioengine_auto'), \
'cocos2dx_extension.ini' : ('cocos2dx_extension', 'jsb_cocos2dx_extension_auto'), \
'cocos2dx_builder.ini' : ('cocos2dx_builder', 'jsb_cocos2dx_builder_auto'), \
'cocos2dx_ui.ini' : ('cocos2dx_ui', 'jsb_cocos2dx_ui_auto'), \
'cocos2dx_studio.ini' : ('cocos2dx_studio', 'jsb_cocos2dx_studio_auto'), \
'cocos2dx_spine.ini' : ('cocos2dx_spine', 'jsb_cocos2dx_spine_auto'), \
'cocos2dx_3d.ini' : ('cocos2dx_3d', 'jsb_cocos2dx_3d_auto'), \
'cocos2dx_3d_ext.ini' : ('cocos2dx_3d_extension', 'jsb_cocos2dx_3d_extension_auto'), \
'cocos2dx_experimental_webView.ini' : ('cocos2dx_experimental_webView', 'jsb_cocos2dx_experimental_webView_auto'), \
'cocos2dx_experimental_video.ini' : ('cocos2dx_experimental_video', 'jsb_cocos2dx_experimental_video_auto'), \
'cocos2dx_physics3d.ini' : ('cocos2dx_physics3d', 'jsb_cocos2dx_physics3d_auto'), \
'cocos2dx_navmesh.ini' : ('cocos2dx_navmesh', 'jsb_cocos2dx_navmesh_auto'),
cmd_args = {'cocos2dx.ini': ('cocos2d-x', 'jsb_cocos2dx_auto'),
'cocos2dx_audioengine.ini': ('cocos2dx_audioengine', 'jsb_cocos2dx_audioengine_auto'),
'cocos2dx_extension.ini': ('cocos2dx_extension', 'jsb_cocos2dx_extension_auto'),
'cocos2dx_builder.ini': ('cocos2dx_builder', 'jsb_cocos2dx_builder_auto'),
'cocos2dx_ui.ini': ('cocos2dx_ui', 'jsb_cocos2dx_ui_auto'),
'cocos2dx_studio.ini': ('cocos2dx_studio', 'jsb_cocos2dx_studio_auto'),
'cocos2dx_spine.ini': ('cocos2dx_spine', 'jsb_cocos2dx_spine_auto'),
'cocos2dx_3d.ini': ('cocos2dx_3d', 'jsb_cocos2dx_3d_auto'),
'cocos2dx_3d_ext.ini': ('cocos2dx_3d_extension', 'jsb_cocos2dx_3d_extension_auto'),
'cocos2dx_experimental_webView.ini': ('cocos2dx_experimental_webView', 'jsb_cocos2dx_experimental_webView_auto'),
'cocos2dx_experimental_video.ini': ('cocos2dx_experimental_video', 'jsb_cocos2dx_experimental_video_auto'),
'cocos2dx_physics3d.ini': ('cocos2dx_physics3d', 'jsb_cocos2dx_physics3d_auto'),
'cocos2dx_navmesh.ini': ('cocos2dx_navmesh', 'jsb_cocos2dx_navmesh_auto'),
}
target = 'spidermonkey'
generator_py = '%s/generator.py' % cxx_generator_root