Merge branch 'v3' into v3_dll

Conflicts:
	cocos/base/ccUtils.h
This commit is contained in:
Huabing.Xu 2014-07-17 14:12:10 +08:00
commit 3c6e87d34e
154 changed files with 2062 additions and 2591 deletions

View File

@ -888,6 +888,7 @@ Developers:
Added TextField::getStringLength()
Add shadow, outline, glow filter support for UIText
Fix UITextField IME can't auto detach
Add getChildByName method for get a node that can be cast to Type T
QiuleiWang
Fix the bug that calculated height of multi-line string was incorrect on iOS
@ -912,6 +913,9 @@ Developers:
chareice
Make `setup.py` work on zsh
taug
Could add seach path and resolution order path in front.
Retired Core Developers:
WenSheng Yang

View File

@ -1,4 +1,7 @@
cocos2d-x-3.2 ??
[NEW] Node: added getChildByName method for get a node that can be cast to Type T
[NEW] FileUtils: could add seach path and resolution order path in front
[FIX] Animation3D: getOrCreate is deprecated and replaced with Animation3D::create
[FIX] Animate3D: setSpeed() accept negtive value, which means play reverse, getPlayback and setPlayBack are deprecated
[FIX] EditBox: can not set/get text in password mode on Mac OS X
@ -7,6 +10,7 @@ cocos2d-x-3.2 ??
[FIX] Lua-binding: support UIVideoPlayer
[FIX] Node: setRotation3D not work based on anchor point
[FIX] Node: modify regular of enumerateChildren, now it just searchs its children
[FIX] ScrollViewDelegate: make the scrollView delegate methods optional
[FIX] Setup.py: not work if using zsh
[FIX] SpriteBatchNode: opacity can not work
[FIX] Sprite3D: may crash on Android if playing animation and replace Scene after come from background

View File

@ -49,15 +49,16 @@ THE SOFTWARE.
#include <algorithm>
NS_CC_BEGIN
namespace experimental {
const int FastTMXLayer::FAST_TMX_ORIENTATION_ORTHO = 0;
const int FastTMXLayer::FAST_TMX_ORIENTATION_HEX = 1;
const int FastTMXLayer::FAST_TMX_ORIENTATION_ISO = 2;
const int TMXLayer::FAST_TMX_ORIENTATION_ORTHO = 0;
const int TMXLayer::FAST_TMX_ORIENTATION_HEX = 1;
const int TMXLayer::FAST_TMX_ORIENTATION_ISO = 2;
// FastTMXLayer - init & alloc & dealloc
FastTMXLayer * FastTMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
{
FastTMXLayer *ret = new FastTMXLayer();
TMXLayer *ret = new TMXLayer();
if (ret->initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo))
{
ret->autorelease();
@ -66,7 +67,7 @@ FastTMXLayer * FastTMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *l
return nullptr;
}
bool FastTMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
{
if( tilesetInfo )
@ -108,7 +109,7 @@ bool FastTMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo
return true;
}
FastTMXLayer::FastTMXLayer()
TMXLayer::TMXLayer()
: _layerName("")
, _layerSize(Size::ZERO)
, _mapTileSize(Size::ZERO)
@ -124,7 +125,7 @@ FastTMXLayer::FastTMXLayer()
_buffersVBO[0] = _buffersVBO[1] = 0;
}
FastTMXLayer::~FastTMXLayer()
TMXLayer::~TMXLayer()
{
CC_SAFE_RELEASE(_tileSet);
CC_SAFE_RELEASE(_texture);
@ -140,7 +141,7 @@ FastTMXLayer::~FastTMXLayer()
}
}
void FastTMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
{
updateTotalQuads();
@ -169,13 +170,13 @@ void FastTMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flag
auto& cmd = _renderCommands[index++];
cmd.init(iter.first);
cmd.func = CC_CALLBACK_0(FastTMXLayer::onDraw, this, _indicesVertexZOffsets[iter.first], iter.second);
cmd.func = CC_CALLBACK_0(TMXLayer::onDraw, this, _indicesVertexZOffsets[iter.first], iter.second);
renderer->addCommand(&cmd);
}
}
void FastTMXLayer::onDraw(int offset, int count)
void TMXLayer::onDraw(int offset, int count)
{
GL::bindTexture2D(_texture->getName());
getGLProgramState()->apply(_modelViewTransform);
@ -194,7 +195,7 @@ void FastTMXLayer::onDraw(int offset, int count)
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, count * 4);
}
void FastTMXLayer::updateTiles(const Rect& culledRect)
void TMXLayer::updateTiles(const Rect& culledRect)
{
Rect visibleTiles = culledRect;
Size mapTileSize = CC_SIZE_PIXELS_TO_POINTS(_mapTileSize);
@ -287,7 +288,7 @@ void FastTMXLayer::updateTiles(const Rect& culledRect)
}
void FastTMXLayer::updateVertexBuffer()
void TMXLayer::updateVertexBuffer()
{
GL::bindVAO(0);
if(!glIsBuffer(_buffersVBO[0]))
@ -300,7 +301,7 @@ void FastTMXLayer::updateVertexBuffer()
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
void FastTMXLayer::updateIndexBuffer()
void TMXLayer::updateIndexBuffer()
{
if(!glIsBuffer(_buffersVBO[1]))
{
@ -312,7 +313,7 @@ void FastTMXLayer::updateIndexBuffer()
}
// FastTMXLayer - setup Tiles
void FastTMXLayer::setupTiles()
void TMXLayer::setupTiles()
{
// Optimization: quick hack that sets the image size on the tileset
_tileSet->_imageSize = _texture->getContentSizeInPixels();
@ -352,7 +353,7 @@ void FastTMXLayer::setupTiles()
}
Mat4 FastTMXLayer::tileToNodeTransform()
Mat4 TMXLayer::tileToNodeTransform()
{
float w = _mapTileSize.width / CC_CONTENT_SCALE_FACTOR();
float h = _mapTileSize.height / CC_CONTENT_SCALE_FACTOR();
@ -404,7 +405,7 @@ Mat4 FastTMXLayer::tileToNodeTransform()
}
void FastTMXLayer::updateTotalQuads()
void TMXLayer::updateTotalQuads()
{
if(_quadsDirty)
{
@ -536,7 +537,7 @@ void FastTMXLayer::updateTotalQuads()
}
// removing / getting tiles
Sprite* FastTMXLayer::getTileAt(const Vec2& tileCoordinate)
Sprite* TMXLayer::getTileAt(const Vec2& tileCoordinate)
{
CCASSERT( tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
CCASSERT( _tiles, "TMXLayer: the tiles map has been released");
@ -576,7 +577,7 @@ Sprite* FastTMXLayer::getTileAt(const Vec2& tileCoordinate)
return tile;
}
int FastTMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags/* = nullptr*/)
int TMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags/* = nullptr*/)
{
CCASSERT(tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
CCASSERT(_tiles, "TMXLayer: the tiles map has been released");
@ -602,12 +603,12 @@ int FastTMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags/*
return (tile & kTMXFlippedMask);
}
Vec2 FastTMXLayer::getPositionAt(const Vec2& pos)
Vec2 TMXLayer::getPositionAt(const Vec2& pos)
{
return PointApplyTransform(pos, _tileToNodeTransform);
}
int FastTMXLayer::getVertexZForPos(const Vec2& pos)
int TMXLayer::getVertexZForPos(const Vec2& pos)
{
int ret = 0;
int maxVal = 0;
@ -638,7 +639,7 @@ int FastTMXLayer::getVertexZForPos(const Vec2& pos)
return ret;
}
void FastTMXLayer::removeTileAt(const Vec2& tileCoordinate)
void TMXLayer::removeTileAt(const Vec2& tileCoordinate)
{
CCASSERT( tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
@ -661,7 +662,7 @@ void FastTMXLayer::removeTileAt(const Vec2& tileCoordinate)
}
}
void FastTMXLayer::setFlaggedTileGIDByIndex(int index, int gid)
void TMXLayer::setFlaggedTileGIDByIndex(int index, int gid)
{
if(gid == _tiles[index]) return;
_tiles[index] = gid;
@ -669,7 +670,7 @@ void FastTMXLayer::setFlaggedTileGIDByIndex(int index, int gid)
_dirty = true;
}
void FastTMXLayer::removeChild(Node* node, bool cleanup)
void TMXLayer::removeChild(Node* node, bool cleanup)
{
int tag = node->getTag();
auto it = _spriteContainer.find(tag);
@ -680,8 +681,8 @@ void FastTMXLayer::removeChild(Node* node, bool cleanup)
Node::removeChild(node, cleanup);
}
// FastTMXLayer - Properties
Value FastTMXLayer::getProperty(const std::string& propertyName) const
// TMXLayer - Properties
Value TMXLayer::getProperty(const std::string& propertyName) const
{
if (_properties.find(propertyName) != _properties.end())
return _properties.at(propertyName);
@ -689,7 +690,7 @@ Value FastTMXLayer::getProperty(const std::string& propertyName) const
return Value();
}
void FastTMXLayer::parseInternalProperties()
void TMXLayer::parseInternalProperties()
{
auto vertexz = getProperty("cc_vertexz");
if (vertexz.isNull()) return;
@ -719,7 +720,7 @@ void FastTMXLayer::parseInternalProperties()
}
//CCTMXLayer2 - obtaining positions, offset
Vec2 FastTMXLayer::calculateLayerOffset(const Vec2& pos)
Vec2 TMXLayer::calculateLayerOffset(const Vec2& pos)
{
Vec2 ret = Vec2::ZERO;
switch (_layerOrientation)
@ -740,12 +741,12 @@ Vec2 FastTMXLayer::calculateLayerOffset(const Vec2& pos)
}
// TMXLayer - adding / remove tiles
void FastTMXLayer::setTileGID(int gid, const Vec2& tileCoordinate)
void TMXLayer::setTileGID(int gid, const Vec2& tileCoordinate)
{
setTileGID(gid, tileCoordinate, (TMXTileFlags)0);
}
void FastTMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flags)
void TMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flags)
{
CCASSERT(tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
CCASSERT(_tiles, "TMXLayer: the tiles map has been released");
@ -796,7 +797,7 @@ void FastTMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags
}
}
void FastTMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid)
void TMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid)
{
sprite->setPosition(getPositionAt(pos));
sprite->setPositionZ((float)getVertexZForPos(pos));
@ -852,9 +853,11 @@ void FastTMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid)
}
}
std::string FastTMXLayer::getDescription() const
std::string TMXLayer::getDescription() const
{
return StringUtils::format("<FastTMXLayer | tag = %d, size = %d,%d>", _tag, (int)_mapTileSize.width, (int)_mapTileSize.height);
}
} //end of namespace experimental
NS_CC_END

View File

@ -45,6 +45,8 @@ class Texture2D;
class Sprite;
struct _ccCArray;
namespace experimental{
/**
* @addtogroup tilemap_parallax_nodes
* @{
@ -76,20 +78,20 @@ http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
@since v3.2
*/
class CC_DLL FastTMXLayer : public Node
class CC_DLL TMXLayer : public Node
{
public:
/** creates a FastTMXLayer with an tileset info, a layer info and a map info */
static FastTMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
/**
* @js ctor
*/
FastTMXLayer();
TMXLayer();
/**
* @js NA
* @lua NA
*/
virtual ~FastTMXLayer();
virtual ~TMXLayer();
/** returns the tile gid at a given tile coordinate. It also returns the tile flags.
*/
@ -256,7 +258,7 @@ public:
// end of tilemap_parallax_nodes group
/// @}
} //end of namespace experimental
NS_CC_END
#endif //__CCTMX_LAYER2_H__

View File

@ -34,12 +34,13 @@ THE SOFTWARE.
#include "deprecated/CCString.h"
NS_CC_BEGIN
namespace experimental {
// implementation FastTMXTiledMap
FastTMXTiledMap * FastTMXTiledMap::create(const std::string& tmxFile)
TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
{
FastTMXTiledMap *ret = new FastTMXTiledMap();
TMXTiledMap *ret = new TMXTiledMap();
if (ret->initWithTMXFile(tmxFile))
{
ret->autorelease();
@ -49,9 +50,9 @@ FastTMXTiledMap * FastTMXTiledMap::create(const std::string& tmxFile)
return nullptr;
}
FastTMXTiledMap* FastTMXTiledMap::createWithXML(const std::string& tmxString, const std::string& resourcePath)
TMXTiledMap* TMXTiledMap::createWithXML(const std::string& tmxString, const std::string& resourcePath)
{
FastTMXTiledMap *ret = new FastTMXTiledMap();
TMXTiledMap *ret = new TMXTiledMap();
if (ret->initWithXML(tmxString, resourcePath))
{
ret->autorelease();
@ -61,7 +62,7 @@ FastTMXTiledMap* FastTMXTiledMap::createWithXML(const std::string& tmxString, co
return nullptr;
}
bool FastTMXTiledMap::initWithTMXFile(const std::string& tmxFile)
bool TMXTiledMap::initWithTMXFile(const std::string& tmxFile)
{
CCASSERT(tmxFile.size()>0, "FastTMXTiledMap: tmx file should not be empty");
@ -79,7 +80,7 @@ bool FastTMXTiledMap::initWithTMXFile(const std::string& tmxFile)
return true;
}
bool FastTMXTiledMap::initWithXML(const std::string& tmxString, const std::string& resourcePath)
bool TMXTiledMap::initWithXML(const std::string& tmxString, const std::string& resourcePath)
{
setContentSize(Size::ZERO);
@ -91,21 +92,21 @@ bool FastTMXTiledMap::initWithXML(const std::string& tmxString, const std::strin
return true;
}
FastTMXTiledMap::FastTMXTiledMap()
TMXTiledMap::TMXTiledMap()
:_mapSize(Size::ZERO)
,_tileSize(Size::ZERO)
{
}
FastTMXTiledMap::~FastTMXTiledMap()
TMXTiledMap::~TMXTiledMap()
{
}
// private
FastTMXLayer * FastTMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
TMXLayer * TMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
{
TMXTilesetInfo *tileset = tilesetForLayer(layerInfo, mapInfo);
FastTMXLayer *layer = FastTMXLayer::create(tileset, layerInfo, mapInfo);
TMXLayer *layer = TMXLayer::create(tileset, layerInfo, mapInfo);
// tell the layerinfo to release the ownership of the tiles map.
layerInfo->_ownTiles = false;
@ -114,7 +115,7 @@ FastTMXLayer * FastTMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *
return layer;
}
TMXTilesetInfo * FastTMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
TMXTilesetInfo * TMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
{
Size size = layerInfo->_layerSize;
auto& tilesets = mapInfo->getTilesets();
@ -155,7 +156,7 @@ TMXTilesetInfo * FastTMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMa
return nullptr;
}
void FastTMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
{
_mapSize = mapInfo->getMapSize();
_tileSize = mapInfo->getTileSize();
@ -173,7 +174,7 @@ void FastTMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
for(const auto &layerInfo : layers) {
if (layerInfo->_visible)
{
FastTMXLayer *child = parseLayer(layerInfo, mapInfo);
TMXLayer *child = parseLayer(layerInfo, mapInfo);
addChild(child, idx, idx);
// update content size with the max size
@ -189,13 +190,13 @@ void FastTMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
}
// public
FastTMXLayer * FastTMXTiledMap::getLayer(const std::string& layerName) const
TMXLayer * TMXTiledMap::getLayer(const std::string& layerName) const
{
CCASSERT(layerName.size() > 0, "Invalid layer name!");
for (auto& child : _children)
{
FastTMXLayer* layer = dynamic_cast<FastTMXLayer*>(child);
TMXLayer* layer = dynamic_cast<TMXLayer*>(child);
if(layer)
{
if(layerName.compare( layer->getLayerName()) == 0)
@ -209,7 +210,7 @@ FastTMXLayer * FastTMXTiledMap::getLayer(const std::string& layerName) const
return nullptr;
}
TMXObjectGroup * FastTMXTiledMap::getObjectGroup(const std::string& groupName) const
TMXObjectGroup * TMXTiledMap::getObjectGroup(const std::string& groupName) const
{
CCASSERT(groupName.size() > 0, "Invalid group name!");
@ -230,7 +231,7 @@ TMXObjectGroup * FastTMXTiledMap::getObjectGroup(const std::string& groupName) c
return nullptr;
}
Value FastTMXTiledMap::getProperty(const std::string& propertyName) const
Value TMXTiledMap::getProperty(const std::string& propertyName) const
{
if (_properties.find(propertyName) != _properties.end())
return _properties.at(propertyName);
@ -238,7 +239,7 @@ Value FastTMXTiledMap::getProperty(const std::string& propertyName) const
return Value();
}
Value FastTMXTiledMap::getPropertiesForGID(int GID) const
Value TMXTiledMap::getPropertiesForGID(int GID) const
{
if (_tileProperties.find(GID) != _tileProperties.end())
return _tileProperties.at(GID);
@ -246,11 +247,12 @@ Value FastTMXTiledMap::getPropertiesForGID(int GID) const
return Value();
}
std::string FastTMXTiledMap::getDescription() const
std::string TMXTiledMap::getDescription() const
{
return StringUtils::format("<FastTMXTiledMap | Tag = %d, Layers = %d", _tag, static_cast<int>(_children.size()));
}
} //end of namespace experimental
NS_CC_END

View File

@ -33,11 +33,14 @@ THE SOFTWARE.
NS_CC_BEGIN
class TMXObjectGroup;
class FastTMXLayer;
class TMXLayerInfo;
class TMXTilesetInfo;
class TMXMapInfo;
namespace experimental {
class TMXLayer;
/** @brief FastTMXTiledMap knows how to parse and render a TMX map.
It adds support for the TMX tiled map format used by http://www.mapeditor.org
@ -89,17 +92,17 @@ object->getProperty(name_of_the_property);
@since v3.2
*/
class CC_DLL FastTMXTiledMap : public Node
class CC_DLL TMXTiledMap : public Node
{
public:
/** creates a TMX Tiled Map with a TMX file.*/
static FastTMXTiledMap* create(const std::string& tmxFile);
static TMXTiledMap* create(const std::string& tmxFile);
/** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */
static FastTMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
static TMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
/** return the FastTMXLayer for the specific layer */
FastTMXLayer* getLayer(const std::string& layerName) const;
TMXLayer* getLayer(const std::string& layerName) const;
/** return the TMXObjectGroup for the specific group */
TMXObjectGroup* getObjectGroup(const std::string& groupName) const;
@ -141,12 +144,12 @@ protected:
/**
* @js ctor
*/
FastTMXTiledMap();
TMXTiledMap();
/**
* @js NA
* @lua NA
*/
virtual ~FastTMXTiledMap();
virtual ~TMXTiledMap();
/** initializes a TMX Tiled Map with a TMX file */
bool initWithTMXFile(const std::string& tmxFile);
@ -154,7 +157,7 @@ protected:
/** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */
bool initWithXML(const std::string& tmxString, const std::string& resourcePath);
FastTMXLayer * parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
TMXLayer * parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
TMXTilesetInfo * tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
void buildWithMapInfo(TMXMapInfo* mapInfo);
@ -173,12 +176,14 @@ protected:
ValueMapIntKey _tileProperties;
private:
CC_DISALLOW_COPY_AND_ASSIGN(FastTMXTiledMap);
CC_DISALLOW_COPY_AND_ASSIGN(TMXTiledMap);
};
// end of tilemap_parallax_nodes group
/// @}
} //end of namespace experimental
NS_CC_END

View File

@ -712,6 +712,15 @@ public:
* @since v3.2
*/
virtual Node* getChildByName(const std::string& name) const;
/**
* Gets a child from the container with its name that can be cast to Type T
*
* @param name An identifier to find the child node.
*
* @return a Node with the given name that can be cast to Type T
*/
template <typename T>
inline T getChildByName(const std::string& name) const { return static_cast<T>(getChildByName(name)); }
/** Search the children of the receiving node to perform processing for nodes which share a name.
*
* @param name The name to search for, supports c++11 regular expression.

View File

@ -28,6 +28,7 @@
#include "CCObjLoader.h"
#include "platform/CCFileUtils.h"
#include "base/ccUtils.h"
NS_CC_BEGIN
@ -102,7 +103,7 @@ static inline int parseInt(const char*& token)
static inline float parseFloat(const char*& token)
{
token += strspn(token, " \t");
float f = (float)atof(token);
float f = (float)utils::atof(token);
token += strcspn(token, " \t\r");
return f;
}

View File

@ -63,6 +63,7 @@
#include "renderer/CCTextureCache.h"
#include "CCGLView.h"
#include "base/base64.h"
#include "base/ccUtils.h"
NS_CC_BEGIN
extern const char* cocos2dVersion(void);
@ -660,8 +661,8 @@ void Console::commandTouch(int fd, const std::string& args)
if((argv.size() == 3) && (isFloat(argv[1]) && isFloat(argv[2])))
{
float x = std::atof(argv[1].c_str());
float y = std::atof(argv[2].c_str());
float x = utils::atof(argv[1].c_str());
float y = utils::atof(argv[2].c_str());
srand ((unsigned)time(nullptr));
_touchId = rand();
@ -686,10 +687,10 @@ void Console::commandTouch(int fd, const std::string& args)
&& (isFloat(argv[3])) && (isFloat(argv[4])))
{
float x1 = std::atof(argv[1].c_str());
float y1 = std::atof(argv[2].c_str());
float x2 = std::atof(argv[3].c_str());
float y2 = std::atof(argv[4].c_str());
float x1 = utils::atof(argv[1].c_str());
float y1 = utils::atof(argv[2].c_str());
float x2 = utils::atof(argv[3].c_str());
float y2 = utils::atof(argv[4].c_str());
srand ((unsigned)time(nullptr));
_touchId = rand();

View File

@ -28,6 +28,8 @@ THE SOFTWARE.
#include <string.h>
#include <stdlib.h>
#include "base/ccUtils.h"
using namespace std;
NS_CC_BEGIN
@ -133,10 +135,10 @@ Rect RectFromString(const std::string& str)
strArray sizeInfo;
CC_BREAK_IF(!splitWithForm(sizeStr.c_str(), sizeInfo));
float x = (float) atof(pointInfo[0].c_str());
float y = (float) atof(pointInfo[1].c_str());
float width = (float) atof(sizeInfo[0].c_str());
float height = (float) atof(sizeInfo[1].c_str());
float x = (float) utils::atof(pointInfo[0].c_str());
float y = (float) utils::atof(pointInfo[1].c_str());
float width = (float) utils::atof(sizeInfo[0].c_str());
float height = (float) utils::atof(sizeInfo[1].c_str());
result = Rect(x, y, width, height);
} while (0);
@ -153,8 +155,8 @@ Vec2 PointFromString(const std::string& str)
strArray strs;
CC_BREAK_IF(!splitWithForm(str, strs));
float x = (float) atof(strs[0].c_str());
float y = (float) atof(strs[1].c_str());
float x = (float) utils::atof(strs[0].c_str());
float y = (float) utils::atof(strs[1].c_str());
ret = Vec2(x, y);
} while (0);
@ -171,8 +173,8 @@ Size SizeFromString(const std::string& pszContent)
strArray strs;
CC_BREAK_IF(!splitWithForm(pszContent, strs));
float width = (float) atof(strs[0].c_str());
float height = (float) atof(strs[1].c_str());
float width = (float) utils::atof(strs[0].c_str());
float height = (float) utils::atof(strs[1].c_str());
ret = Size(width, height);
} while (0);

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include "platform/CCFileUtils.h"
#include "tinyxml2.h"
#include "base/base64.h"
#include "base/ccUtils.h"
#if (CC_TARGET_PLATFORM != CC_PLATFORM_IOS && CC_TARGET_PLATFORM != CC_PLATFORM_MAC && CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID)
@ -250,7 +251,7 @@ double UserDefault::getDoubleForKey(const char* pKey, double defaultValue)
if (value)
{
ret = atof(value);
ret = utils::atof(value);
}
if (doc) delete doc;

View File

@ -24,6 +24,7 @@ THE SOFTWARE.
****************************************************************************/
#include "base/CCUserDefault.h"
#include "base/CCPlatformConfig.h"
#include "base/ccUtils.h"
#include "platform/CCCommon.h"
#include "base/base64.h"
@ -243,7 +244,7 @@ float UserDefault::getFloatForKey(const char* pKey, float defaultValue)
{
if (node->FirstChild())
{
float ret = atof((const char*)node->FirstChild()->Value());
float ret = utils::atof((const char*)node->FirstChild()->Value());
// set value in NSUserDefaults
setFloatForKey(pKey, ret);
@ -279,7 +280,7 @@ double UserDefault::getDoubleForKey(const char* pKey, double defaultValue)
{
if (node->FirstChild())
{
double ret = atof((const char*)node->FirstChild()->Value());
double ret = utils::atof((const char*)node->FirstChild()->Value());
// set value in NSUserDefaults
setDoubleForKey(pKey, ret);

View File

@ -25,6 +25,7 @@
#include "base/CCValue.h"
#include <sstream>
#include <iomanip>
#include "base/ccUtils.h"
NS_CC_BEGIN
@ -504,7 +505,7 @@ float Value::asFloat() const
if (_type == Type::STRING)
{
return atof(_field.strVal->c_str());
return utils::atof(_field.strVal->c_str());
}
if (_type == Type::INTEGER)
@ -540,7 +541,7 @@ double Value::asDouble() const
if (_type == Type::STRING)
{
return static_cast<double>(atof(_field.strVal->c_str()));
return static_cast<double>(utils::atof(_field.strVal->c_str()));
}
if (_type == Type::INTEGER)

View File

@ -24,6 +24,9 @@ THE SOFTWARE.
****************************************************************************/
#include "base/ccUtils.h"
#include <stdlib.h>
#include "base/CCDirector.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h"
@ -160,6 +163,27 @@ std::vector<Node*> findChildren(const Node &node, const std::string &name)
return vec;
}
#define MAX_ITOA_BUFFER_SIZE 256
double atof(const char* str)
{
if (str == nullptr)
{
return 0.0;
}
char buf[MAX_ITOA_BUFFER_SIZE];
strncpy(buf, str, MAX_ITOA_BUFFER_SIZE);
// strip string, only remain 7 numbers after '.'
char* dot = strchr(buf, '.');
if (dot != nullptr && dot - buf + 8 < MAX_ITOA_BUFFER_SIZE)
{
dot[8] = '\0';
}
return ::atof(buf);
}
}

View File

@ -73,6 +73,11 @@ namespace utils
* @since v3.2
*/
std::vector<Node*> CC_DLL findChildren(const Node &node, const std::string &name);
/** Same to ::atof, but strip the string, remain 7 numbers after '.' before call atof。
* Why we need this? Because in android c++_static, atof ( and std::atof ) is unsupported for numbers have long decimal part and contain several numbers can approximate to 1 like 90.099998474121094 ), it will return inf. this function is used to fix this bug.
*/
double atof(const char* str);
}
NS_CC_END

View File

@ -29,6 +29,7 @@ Copyright (c) 2013-2014 Chukong Technologies
#include <stdlib.h>
#include <stdio.h>
#include "CCArray.h"
#include "base/ccUtils.h"
NS_CC_BEGIN
@ -118,7 +119,7 @@ float __String::floatValue() const
{
return 0.0f;
}
return (float)atof(_string.c_str());
return (float)utils::atof(_string.c_str());
}
double __String::doubleValue() const
@ -127,7 +128,7 @@ double __String::doubleValue() const
{
return 0.0;
}
return atof(_string.c_str());
return utils::atof(_string.c_str());
}
bool __String::boolValue() const

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "ui/UIWidget.h"
#include "ui/UIHelper.h"
#include "cocostudio/CocoLoader.h"
#include "base/ccUtils.h"
using namespace cocos2d;
using namespace ui;
@ -184,7 +185,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic, Ref* root)
}
float ActionNode::valueToFloat(const std::string& value)
{
return atof(value.c_str());
return utils::atof(value.c_str());
}
void ActionNode::initWithBinary(CocoLoader *cocoLoader,

View File

@ -29,6 +29,7 @@ THE SOFTWARE.
#include "base/CCDirector.h"
#include "base/CCScheduler.h"
#include "2d/CCActionInstant.h"
#include "base/ccUtils.h"
using namespace cocos2d;
@ -189,7 +190,7 @@ bool ActionObject::valueToBool(const std::string& value)
}
float ActionObject::valueToFloat(const std::string& value)
{
return atof(value.c_str());
return utils::atof(value.c_str());
}
void ActionObject::addActionNode(ActionNode* node)

View File

@ -25,6 +25,7 @@ THE SOFTWARE.
#include "platform/CCFileUtils.h"
#include "base/CCDirector.h"
#include "base/CCScheduler.h"
#include "base/ccUtils.h"
#include "tinyxml2.h"
@ -1763,7 +1764,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
if (key.compare(CONTENT_SCALE) == 0)
{
std::string value = tpChildArray[i].GetValue(&tCocoLoader);
dataInfo->contentScale = atof(value.c_str());
dataInfo->contentScale = utils::atof(value.c_str());
}
else if ( 0 == key.compare(ARMATURE_DATA))
{
@ -1879,7 +1880,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
armatureData->name = name;
}
float version = atof(pAramtureDataArray[1].GetValue(cocoLoader));
float version = utils::atof(pAramtureDataArray[1].GetValue(cocoLoader));
dataInfo->cocoStudioVersion = armatureData->dataVersion = version; //DICTOOL->getFloatValue_json(json, VERSION, 0.1f);
int length = pAramtureDataArray[3].GetChildNum(); //DICTOOL->getArrayCount_json(json, BONE_DATA, 0);
@ -1989,27 +1990,27 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
str = SkinDataValue[i].GetValue(cocoLoader);
if (key.compare(A_X) == 0)
{
sdd->skinData.x = atof(str) * s_PositionReadScale;
sdd->skinData.x = utils::atof(str) * s_PositionReadScale;
}
else if (key.compare(A_Y) == 0)
{
sdd->skinData.y = atof(str) * s_PositionReadScale;
sdd->skinData.y = utils::atof(str) * s_PositionReadScale;
}
else if (key.compare(A_SCALE_X) == 0)
{
sdd->skinData.scaleX = atof(str);
sdd->skinData.scaleX = utils::atof(str);
}
else if (key.compare(A_SCALE_Y) == 0)
{
sdd->skinData.scaleY = atof(str);
sdd->skinData.scaleY = utils::atof(str);
}
else if (key.compare(A_SKEW_X) == 0)
{
sdd->skinData.skewX = atof(str);
sdd->skinData.skewX = utils::atof(str);
}
else if (key.compare(A_SKEW_Y) == 0)
{
sdd->skinData.skewY = atof(str);
sdd->skinData.skewY = utils::atof(str);
}
}
@ -2168,7 +2169,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
movementData->scale = 1.0;
if(str != nullptr)
{
movementData->scale = atof(str);
movementData->scale = utils::atof(str);
}
}
else if (key.compare(A_TWEEN_EASING) == 0)
@ -2220,7 +2221,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
{
if(str != nullptr)
{
movementBoneData->delay = atof(str);
movementBoneData->delay = utils::atof(str);
}
}
else if (key.compare(FRAME_DATA) == 0)
@ -2382,7 +2383,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
str = pFrameData[ii].GetValue(cocoLoader);
if (str != nullptr)
{
frameData->easingParams[ii] = atof(str);
frameData->easingParams[ii] = utils::atof(str);
}
}
}
@ -2421,28 +2422,28 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
{
if(str != nullptr)
{
textureData->width = atof(str);
textureData->width = utils::atof(str);
}
}
else if (key.compare(A_HEIGHT) == 0)
{
if(str != nullptr)
{
textureData->height = atof(str);
textureData->height = utils::atof(str);
}
}
else if (key.compare(A_PIVOT_X) == 0)
{
if(str != nullptr)
{
textureData->pivotX = atof(str);
textureData->pivotX = utils::atof(str);
}
}
else if (key.compare(A_PIVOT_Y) == 0)
{
if(str != nullptr)
{
textureData->pivotY = atof(str);
textureData->pivotY = utils::atof(str);
}
}
else if (key.compare(CONTOUR_DATA) == 0)
@ -2481,8 +2482,8 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
{
pVerTexPoint = pVerTexPointArray[ii].GetChildArray(cocoLoader);
Vec2 vertex;
vertex.x = atof(pVerTexPoint[0].GetValue(cocoLoader));
vertex.y = atof(pVerTexPoint[1].GetValue(cocoLoader));
vertex.x = utils::atof(pVerTexPoint[0].GetValue(cocoLoader));
vertex.y = utils::atof(pVerTexPoint[1].GetValue(cocoLoader));
contourData->vertexList.push_back(vertex); }
break;
}
@ -2505,11 +2506,11 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
str = child->GetValue(cocoLoader);
if (key.compare(A_X) == 0)
{
node->x = atof(str) * dataInfo->contentScale;
node->x = utils::atof(str) * dataInfo->contentScale;
}
else if (key.compare(A_Y) == 0)
{
node->y = atof(str) * dataInfo->contentScale;
node->y = utils::atof(str) * dataInfo->contentScale;
}
else if (key.compare(A_Z) == 0)
{
@ -2517,19 +2518,19 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json,
}
else if (key.compare(A_SKEW_X) == 0)
{
node->skewX = atof(str);
node->skewX = utils::atof(str);
}
else if (key.compare(A_SKEW_Y) == 0)
{
node->skewY = atof(str);
node->skewY = utils::atof(str);
}
else if (key.compare(A_SCALE_X) == 0)
{
node->scaleX = atof(str);
node->scaleX = utils::atof(str);
}
else if (key.compare(A_SCALE_Y) == 0)
{
node->scaleY = atof(str);
node->scaleY = utils::atof(str);
}
else if (key.compare(COLOR_INFO) == 0)
{

View File

@ -1241,9 +1241,9 @@ Widget* WidgetPropertiesReader0300::createWidget(const rapidjson::Value& data, c
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(file);
}
}else if (key == "designWidth"){
fileDesignWidth = atof(tpChildArray[i].GetValue(cocoLoader));
fileDesignWidth = utils::atof(tpChildArray[i].GetValue(cocoLoader));
}else if (key == "designHeight"){
fileDesignHeight = atof(tpChildArray[i].GetValue(cocoLoader));
fileDesignHeight = utils::atof(tpChildArray[i].GetValue(cocoLoader));
}else if (key == "widgetTree"){
if (fileDesignWidth <= 0 || fileDesignHeight <= 0) {

View File

@ -510,12 +510,12 @@ void SceneReader::setPropertyFromJsonDict(CocoLoader *cocoLoader, stExpCocoNode
if (key == "x")
{
x = atof(value.c_str());
x = utils::atof(value.c_str());
node->setPositionX(x);
}
else if (key == "y")
{
y = atof(value.c_str());
y = utils::atof(value.c_str());
node->setPositionY(y);
}
else if (key == "visible")
@ -535,7 +535,7 @@ void SceneReader::setPropertyFromJsonDict(CocoLoader *cocoLoader, stExpCocoNode
}
else if(key == "scalex")
{
fScaleX = atof(value.c_str());
fScaleX = utils::atof(value.c_str());
node->setScaleX(fScaleX);
}
else if(key == "scaley")
@ -545,7 +545,7 @@ void SceneReader::setPropertyFromJsonDict(CocoLoader *cocoLoader, stExpCocoNode
}
else if(key == "rotation")
{
fRotationZ = atof(value.c_str());
fRotationZ = utils::atof(value.c_str());
node->setRotation(fRotationZ);
}
}

View File

@ -191,7 +191,7 @@ bool TriggerMng::isEmpty(void) const
}
void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
{
int count = pCocoNode[13].GetChildNum();
int length = 0;
@ -262,15 +262,15 @@ bool TriggerMng::isEmpty(void) const
}
else
{
rapidjson::Type type = pDataItemArray[i4].GetType(pCocoLoader);
rapidjson::Type type = pDataItemArray[i5].GetType(pCocoLoader);
if (type == rapidjson::kStringType)
{
dataitem.AddMember("value", str3, allocator);
}
else if(type == rapidjson::kNumberType)
else
{
int nV = atoi(str3);
float fV = atof(str3);
float fV = utils::atof(str3);
if (fabs(nV - fV) < 0.0000001)
{
dataitem.AddMember("value", nV, allocator);
@ -343,10 +343,10 @@ bool TriggerMng::isEmpty(void) const
{
dataitem.AddMember("value", str5, allocator);
}
else if(type == rapidjson::kNumberType)
else
{
int nV = atoi(str5);
float fV = atof(str5);
float fV = utils::atof(str5);
if (fabs(nV - fV) < 0.0000001)
{
dataitem.AddMember("value", nV, allocator);

View File

@ -241,98 +241,98 @@ void TriggerObj::serialize(const rapidjson::Value &val)
}
void TriggerObj::serialize(cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
void TriggerObj::serialize(cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
{
int length = pCocoNode->GetChildNum();
int count = 0;
int num = 0;
stExpCocoNode *pTriggerObjArray = pCocoNode->GetChildArray(pCocoLoader);
for (int i0 = 0; i0 < length; ++i0)
{
int length = pCocoNode->GetChildNum();
int count = 0;
int num = 0;
stExpCocoNode *pTriggerObjArray = pCocoNode->GetChildArray(pCocoLoader);
for (int i0 = 0; i0 < length; ++i0)
std::string key = pTriggerObjArray[i0].GetName(pCocoLoader);
const char* str0 = pTriggerObjArray[i0].GetValue(pCocoLoader);
if (key.compare("id") == 0)
{
std::string key = pTriggerObjArray[i0].GetName(pCocoLoader);
const char* str0 = pTriggerObjArray[i0].GetValue(pCocoLoader);
if (key.compare("id") == 0)
if (str0 != nullptr)
{
if (str0 != nullptr)
{
_id = atoi(str0); //(unsigned int)(DICTOOL->getIntValue_json(val, "id"));
}
_id = atoi(str0);
}
else if (key.compare("conditions") == 0)
}
else if (key.compare("conditions") == 0)
{
count = pTriggerObjArray[i0].GetChildNum();
stExpCocoNode *pConditionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
for (int i1 = 0; i1 < count; ++i1)
{
count = pTriggerObjArray[i0].GetChildNum();
stExpCocoNode *pConditionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
for (int i1 = 0; i1 < count; ++i1)
num = pConditionsArray[i1].GetChildNum();
stExpCocoNode *pConditionArray = pConditionsArray[i1].GetChildArray(pCocoLoader);
const char *classname = pConditionArray[0].GetValue(pCocoLoader);
if (classname == nullptr)
{
num = pConditionsArray[i1].GetChildNum();
stExpCocoNode *pConditionArray = pConditionsArray[i1].GetChildArray(pCocoLoader);
const char *classname = pConditionArray[0].GetValue(pCocoLoader);
if (classname == nullptr)
{
continue;
}
BaseTriggerCondition *con = dynamic_cast<BaseTriggerCondition*>(ObjectFactory::getInstance()->createObject(classname));
CCAssert(con != nullptr, "class named classname can not implement!");
con->serialize(pCocoLoader, &pConditionArray[1]);
con->init();
_cons.pushBack(con);
continue;
}
BaseTriggerCondition *con = dynamic_cast<BaseTriggerCondition*>(ObjectFactory::getInstance()->createObject(classname));
CCAssert(con != nullptr, "class named classname can not implement!");
con->serialize(pCocoLoader, &pConditionArray[1]);
con->init();
_cons.pushBack(con);
}
else if (key.compare("actions") == 0)
}
else if (key.compare("actions") == 0)
{
count = pTriggerObjArray[i0].GetChildNum();
stExpCocoNode *pActionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
for (int i2 = 0; i2 < count; ++i2)
{
count = pTriggerObjArray[i0].GetChildNum();
stExpCocoNode *pActionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
for (int i2 = 0; i2 < count; ++i2)
num = pActionsArray[i2].GetChildNum();
stExpCocoNode *pActionArray = pActionsArray[i2].GetChildArray(pCocoLoader);
const char *classname = pActionArray[0].GetValue(pCocoLoader);
if (classname == nullptr)
{
num = pActionsArray[i2].GetChildNum();
stExpCocoNode *pActionArray = pActionsArray[i2].GetChildArray(pCocoLoader);
const char *classname = pActionArray[0].GetValue(pCocoLoader);
if (classname == nullptr)
{
continue;
}
BaseTriggerAction *act = dynamic_cast<BaseTriggerAction*>(ObjectFactory::getInstance()->createObject(classname));
CCAssert(act != nullptr, "class named classname can not implement!");
act->serialize(pCocoLoader, &pActionArray[1]);
act->init();
_acts.pushBack(act);
continue;
}
BaseTriggerAction *act = dynamic_cast<BaseTriggerAction*>(ObjectFactory::getInstance()->createObject(classname));
CCAssert(act != nullptr, "class named classname can not implement!");
act->serialize(pCocoLoader, &pActionArray[1]);
act->init();
_acts.pushBack(act);
}
else if (key.compare("events") == 0)
}
else if (key.compare("events") == 0)
{
count = pTriggerObjArray[i0].GetChildNum();
stExpCocoNode *pEventsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
for (int i3 = 0; i3 < count; ++i3)
{
count = pTriggerObjArray[i0].GetChildNum();
stExpCocoNode *pEventsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
for (int i3 = 0; i3 < count; ++i3)
num = pEventsArray[i3].GetChildNum();
stExpCocoNode *pEventArray = pEventsArray[i3].GetChildArray(pCocoLoader);
const char *str1 = pEventArray[0].GetValue(pCocoLoader);
if (str1 == nullptr)
{
num = pEventsArray[i3].GetChildNum();
stExpCocoNode *pEventArray = pEventsArray[i3].GetChildArray(pCocoLoader);
const char *str1 = pEventArray[0].GetValue(pCocoLoader);
if (str1 == nullptr)
{
continue;
}
int event = atoi(str1);
if (event < 0)
{
continue;
}
char* buf = new char[10];
sprintf(buf, "%d", event);
std::string custom_event_name(buf);
CC_SAFE_DELETE_ARRAY(buf);
EventListenerCustom* listener = EventListenerCustom::create(custom_event_name, [=](EventCustom* evt){
if (detect())
{
done();
}
});
_listeners.pushBack(listener);
TriggerMng::getInstance()->addEventListenerWithFixedPriority(listener, 1);
continue;
}
int event = atoi(str1);
if (event < 0)
{
continue;
}
char* buf = new char[10];
sprintf(buf, "%d", event);
std::string custom_event_name(buf);
CC_SAFE_DELETE_ARRAY(buf);
EventListenerCustom* listener = EventListenerCustom::create(custom_event_name, [=](EventCustom* evt){
if (detect())
{
done();
}
});
_listeners.pushBack(listener);
TriggerMng::getInstance()->addEventListenerWithFixedPriority(listener, 1);
}
}
}
}

View File

@ -87,7 +87,7 @@ namespace cocostudio
};
valueToFloat = [=](const std::string& str) -> float{
return atof(str.c_str());
return utils::atof(str.c_str());
};
}

View File

@ -31,6 +31,7 @@ THE SOFTWARE.
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "platform/CCSAXParser.h"
#include "base/ccUtils.h"
#include "tinyxml2.h"
#include "unzip.h"
@ -257,7 +258,7 @@ public:
else if (sName == "integer")
_curArray->push_back(Value(atoi(_curValue.c_str())));
else
_curArray->push_back(Value(atof(_curValue.c_str())));
_curArray->push_back(Value(utils::atof(_curValue.c_str())));
}
else if (SAX_DICT == curState)
{
@ -266,7 +267,7 @@ public:
else if (sName == "integer")
(*_curDict)[_curKey] = Value(atoi(_curValue.c_str()));
else
(*_curDict)[_curKey] = Value(atof(_curValue.c_str()));
(*_curDict)[_curKey] = Value(utils::atof(_curValue.c_str()));
}
_curValue.clear();
@ -765,13 +766,16 @@ void FileUtils::setSearchResolutionsOrder(const std::vector<std::string>& search
}
}
void FileUtils::addSearchResolutionsOrder(const std::string &order)
void FileUtils::addSearchResolutionsOrder(const std::string &order,const bool front)
{
std::string resOrder = order;
if (!resOrder.empty() && resOrder[resOrder.length()-1] != '/')
resOrder.append("/");
_searchResolutionsOrderArray.push_back(resOrder);
if (front) {
_searchResolutionsOrderArray.insert(_searchResolutionsOrderArray.begin(), resOrder);
} else {
_searchResolutionsOrderArray.push_back(resOrder);
}
}
const std::vector<std::string>& FileUtils::getSearchResolutionsOrder()
@ -818,7 +822,7 @@ void FileUtils::setSearchPaths(const std::vector<std::string>& searchPaths)
}
}
void FileUtils::addSearchPath(const std::string &searchpath)
void FileUtils::addSearchPath(const std::string &searchpath,const bool front)
{
std::string prefix;
if (!isAbsolutePath(searchpath))
@ -829,7 +833,11 @@ void FileUtils::addSearchPath(const std::string &searchpath)
{
path += "/";
}
_searchPathArray.push_back(path);
if (front) {
_searchPathArray.insert(_searchPathArray.begin(), path);
} else {
_searchPathArray.push_back(path);
}
}
void FileUtils::setFilenameLookupDictionary(const ValueMap& filenameLookupDict)

View File

@ -229,7 +229,7 @@ public:
* @see setSearchResolutionsOrder(), fullPathForFilename().
* @since v2.1
*/
virtual void addSearchResolutionsOrder(const std::string &order);
virtual void addSearchResolutionsOrder(const std::string &order,const bool front=false);
/**
* Gets the array that contains the search order of the resources.
@ -266,7 +266,7 @@ public:
*
* @since v2.1
*/
void addSearchPath(const std::string & path);
void addSearchPath(const std::string & path, const bool front=false);
/**
* Gets the array of search paths.

View File

@ -270,7 +270,7 @@ public abstract class GameControllerActivity extends Cocos2dxActivity implements
mControllerOuya.onResume();
}
mControllerHelper.gatherControllers();
GameControllerHelper.gatherControllers(mControllerHelper.mGameController);
}
@Override

View File

@ -80,6 +80,7 @@ public class GameControllerHelper {
int deviceId = event.getDeviceId();
String deviceName = event.getDevice().getName();
if(mGameController.get(deviceId) == null){
gatherControllers(mGameController);
mGameController.append(deviceId, deviceName);
}
@ -167,6 +168,7 @@ public class GameControllerHelper {
String deviceName = event.getDevice().getName();
if(mGameController.get(deviceId) == null){
gatherControllers(mGameController);
mGameController.append(deviceId, deviceName);
}
@ -224,7 +226,7 @@ public class GameControllerHelper {
}
void onInputDeviceChanged(int deviceId){
gatherControllers();
gatherControllers(mGameController);
}
void onInputDeviceRemoved(int deviceId) {
@ -234,20 +236,20 @@ public class GameControllerHelper {
}
}
void gatherControllers(){
int controllerCount = mGameController.size();
static void gatherControllers(SparseArray<String> controllers){
int controllerCount = controllers.size();
for (int i = 0; i < controllerCount; i++) {
try {
int controllerDeveceId = mGameController.keyAt(i);
int controllerDeveceId = controllers.keyAt(i);
InputDevice device = InputDevice.getDevice(controllerDeveceId);
if (device == null) {
GameControllerAdapter.onDisconnected(mGameController.get(controllerDeveceId), controllerDeveceId);
mGameController.delete(controllerDeveceId);
GameControllerAdapter.onDisconnected(controllers.get(controllerDeveceId), controllerDeveceId);
controllers.delete(controllerDeveceId);
}
} catch (Exception e) {
int controllerDeveceId = mGameController.keyAt(i);
GameControllerAdapter.onDisconnected(mGameController.get(controllerDeveceId), controllerDeveceId);
mGameController.delete(controllerDeveceId);
int controllerDeveceId = controllers.keyAt(i);
GameControllerAdapter.onDisconnected(controllers.get(controllerDeveceId), controllerDeveceId);
controllers.delete(controllerDeveceId);
e.printStackTrace();
}
}

View File

@ -113,7 +113,7 @@ OnSimpleStickListener, OnAccListener, OnGyroListener, OnStateListener, GameContr
{
if( !mControllerService.hasDeviceConnected() ){
Bundle bun = new Bundle();
bun.putBoolean(ControllerService.FLAG_IS_SHOW_GAMEPAD_TIP, true);
bun.putBoolean(ControllerService.FLAG_IS_SHOW_GAMEPAD_TIP, false);
try {
mControllerService.showDeviceManagerUI(mContext, bun);
} catch (ControllerServiceException e) {

View File

@ -5,6 +5,7 @@ import org.cocos2dx.lib.GameControllerDelegate;
import tv.ouya.console.api.OuyaController;
import android.content.Context;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.KeyEvent;
import android.view.MotionEvent;
@ -13,6 +14,8 @@ public class GameControllerOuya implements GameControllerDelegate{
private SparseIntArray mKeyMap;
private SparseArray<String> mGameController = new SparseArray<String>();
public GameControllerOuya(){
mKeyMap = new SparseIntArray(20);
mKeyMap.put(OuyaController.BUTTON_A, GameControllerDelegate.BUTTON_B);
@ -25,13 +28,9 @@ public class GameControllerOuya implements GameControllerDelegate{
mKeyMap.put(OuyaController.BUTTON_DPAD_UP, GameControllerDelegate.BUTTON_DPAD_UP);
mKeyMap.put(OuyaController.BUTTON_L1, GameControllerDelegate.BUTTON_LEFT_SHOULDER);
mKeyMap.put(OuyaController.BUTTON_R1, GameControllerDelegate.BUTTON_RIGHT_SHOULDER);
mKeyMap.put(OuyaController.AXIS_L2, GameControllerDelegate.BUTTON_LEFT_TRIGGER);
mKeyMap.put(OuyaController.AXIS_R2, GameControllerDelegate.BUTTON_RIGHT_TRIGGER);
mKeyMap.put(OuyaController.AXIS_LS_X, GameControllerDelegate.BUTTON_LEFT_THUMBSTICK);
mKeyMap.put(OuyaController.AXIS_LS_Y, GameControllerDelegate.BUTTON_LEFT_THUMBSTICK);
mKeyMap.put(OuyaController.AXIS_RS_X, GameControllerDelegate.BUTTON_RIGHT_THUMBSTICK);
mKeyMap.put(OuyaController.AXIS_RS_Y, GameControllerDelegate.BUTTON_RIGHT_THUMBSTICK);
mKeyMap.put(OuyaController.BUTTON_L3, GameControllerDelegate.BUTTON_LEFT_THUMBSTICK);
mKeyMap.put(OuyaController.BUTTON_R3, GameControllerDelegate.BUTTON_RIGHT_THUMBSTICK);
}
public void onCreate(Context context) {
@ -61,7 +60,11 @@ public class GameControllerOuya implements GameControllerDelegate{
{
int deviceId = event.getDeviceId();
String deviceName = event.getDevice().getName();
OuyaController c = OuyaController.getControllerByDeviceId(deviceId);
OuyaController c = OuyaController.getControllerByDeviceId(deviceId);
if (mGameController.get(deviceId) == null) {
GameControllerHelper.gatherControllers(mGameController);
mGameController.append(deviceId, deviceName);
}
float newLeftTrigger = c.getAxisValue(OuyaController.AXIS_L2);
if (Float.compare(newLeftTrigger, mOldLeftTrigger) != 0) {
@ -125,10 +128,6 @@ public class GameControllerOuya implements GameControllerDelegate{
int action = event.getAction();
int keyCode = event.getKeyCode();
if (keyCode == KeyEvent.KEYCODE_BUTTON_L2 || keyCode == KeyEvent.KEYCODE_BUTTON_R2) {
return true;
}
if (action == KeyEvent.ACTION_DOWN) {
handled = OuyaController.onKeyDown(keyCode, event);
}
@ -143,10 +142,17 @@ public class GameControllerOuya implements GameControllerDelegate{
isAnalog = true;
}
int deviceId = event.getDeviceId();
String deviceName = event.getDevice().getName();
if (mGameController.get(deviceId) == null) {
GameControllerHelper.gatherControllers(mGameController);
mGameController.append(deviceId, deviceName);
}
if (action == KeyEvent.ACTION_DOWN) {
mControllerEventListener.onButtonEvent(event.getDevice().getName(), event.getDeviceId(), mKeyMap.get(keyCode), true, 1.0f, isAnalog);
mControllerEventListener.onButtonEvent(deviceName, deviceId, mKeyMap.get(keyCode), true, 1.0f, isAnalog);
}else {
mControllerEventListener.onButtonEvent(event.getDevice().getName(), event.getDeviceId(), mKeyMap.get(keyCode), false, 0.0f, isAnalog);
mControllerEventListener.onButtonEvent(deviceName, deviceId, mKeyMap.get(keyCode), false, 0.0f, isAnalog);
}
}

View File

@ -30,6 +30,7 @@ THE SOFTWARE.
#include "base/CCEventKeyboard.h"
#include "base/CCEventMouse.h"
#include "base/CCIMEDispatcher.h"
#include "base/ccUtils.h"
#include <unordered_map>
@ -356,7 +357,7 @@ bool GLView::initWithRect(const std::string& viewName, Rect rect, float frameZoo
// check OpenGL version at first
const GLubyte* glVersion = glGetString(GL_VERSION);
if ( atof((const char*)glVersion) < 1.5 )
if ( utils::atof((const char*)glVersion) < 1.5 )
{
char strComplain[256] = {0};
sprintf(strComplain,

File diff suppressed because it is too large Load Diff

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: setEye(float, float, float)
--
-- overload function: setEye(vec3_table)
--
-- @overload self, float, float, float
-- @overload self, vec3_table
-- @function [parent=#ActionCamera] setEye
-- @param self
-- @param #float float

View File

@ -5,10 +5,8 @@
-- @parent_module ccs
--------------------------------
-- overload function: getAction(float, ccs.ActionFrame)
--
-- overload function: getAction(float)
--
-- @overload self, float, ccs.ActionFrame
-- @overload self, float
-- @function [parent=#ActionFrame] getAction
-- @param self
-- @param #float float

View File

@ -5,10 +5,8 @@
-- @parent_module ccs
--------------------------------
-- overload function: playActionByName(char, char, cc.CallFunc)
--
-- overload function: playActionByName(char, char)
--
-- @overload self, char, char, cc.CallFunc
-- @overload self, char, char
-- @function [parent=#ActionManagerEx] playActionByName
-- @param self
-- @param #char char
@ -23,14 +21,6 @@
-- @param #char char
-- @return ActionObject#ActionObject ret (return value: ccs.ActionObject)
--------------------------------
-- @function [parent=#ActionManagerEx] initWithBinary
-- @param self
-- @param #char char
-- @param #cc.Ref ref
-- @param #ccs.CocoLoader cocoloader
-- @param #ccs.stExpCocoNode stexpcoconode
--------------------------------
-- @function [parent=#ActionManagerEx] releaseActions
-- @param self

View File

@ -38,10 +38,8 @@
-- @param self
--------------------------------
-- overload function: play(cc.CallFunc)
--
-- overload function: play()
--
-- @overload self, cc.CallFunc
-- @overload self
-- @function [parent=#ActionObject] play
-- @param self
-- @param #cc.CallFunc callfunc
@ -61,13 +59,6 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#ActionObject] initWithBinary
-- @param self
-- @param #ccs.CocoLoader cocoloader
-- @param #ccs.stExpCocoNode stexpcoconode
-- @param #cc.Ref ref
--------------------------------
-- @function [parent=#ActionObject] addActionNode
-- @param self

View File

@ -10,10 +10,8 @@
-- @param #float float
--------------------------------
-- overload function: getAction(float, ccs.ActionFrame)
--
-- overload function: getAction(float)
--
-- @overload self, float, ccs.ActionFrame
-- @overload self, float
-- @function [parent=#ActionRotationFrame] getAction
-- @param self
-- @param #float float

View File

@ -83,14 +83,10 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- overload function: gotoFrameAndPlay(int, bool)
--
-- overload function: gotoFrameAndPlay(int)
--
-- overload function: gotoFrameAndPlay(int, int, bool)
--
-- overload function: gotoFrameAndPlay(int, int, int, bool)
--
-- @overload self, int, bool
-- @overload self, int
-- @overload self, int, int, bool
-- @overload self, int, int, int, bool
-- @function [parent=#ActionTimeline] gotoFrameAndPlay
-- @param self
-- @param #int int

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: getAnimation()
--
-- overload function: getAnimation()
--
-- @overload self
-- @overload self
-- @function [parent=#Animate] getAnimation
-- @param self
-- @return Animation#Animation ret (retunr value: cc.Animation)

View File

@ -25,10 +25,8 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: create(cc.Animation3D, float, float)
--
-- overload function: create(cc.Animation3D)
--
-- @overload self, cc.Animation3D, float, float
-- @overload self, cc.Animation3D
-- @function [parent=#Animate3D] create
-- @param self
-- @param #cc.Animation3D animation3d

View File

@ -76,10 +76,8 @@
-- @param #rect_table rect
--------------------------------
-- overload function: create(array_table, float, unsigned int)
--
-- overload function: create()
--
-- @overload self, array_table, float, unsigned int
-- @overload self
-- @function [parent=#Animation] create
-- @param self
-- @param #array_table array

View File

@ -10,10 +10,8 @@
-- @param #cc.SpriteFrame spriteframe
--------------------------------
-- overload function: getUserInfo()
--
-- overload function: getUserInfo()
--
-- @overload self
-- @overload self
-- @function [parent=#AnimationFrame] getUserInfo
-- @param self
-- @return map_table#map_table ret (retunr value: map_table)

View File

@ -59,12 +59,9 @@
-- @return BatchNode#BatchNode ret (return value: ccs.BatchNode)
--------------------------------
-- overload function: init(string)
--
-- overload function: init()
--
-- overload function: init(string, ccs.Bone)
--
-- @overload self, string
-- @overload self
-- @overload self, string, ccs.Bone
-- @function [parent=#Armature] init
-- @param self
-- @param #string str
@ -117,12 +114,9 @@
-- @return map_table#map_table ret (return value: map_table)
--------------------------------
-- overload function: create(string)
--
-- overload function: create()
--
-- overload function: create(string, ccs.Bone)
--
-- @overload self, string
-- @overload self
-- @overload self, string, ccs.Bone
-- @function [parent=#Armature] create
-- @param self
-- @param #string str

View File

@ -22,10 +22,8 @@
-- @param #string str
--------------------------------
-- overload function: addArmatureFileInfo(string, string, string)
--
-- overload function: addArmatureFileInfo(string)
--
-- @overload self, string, string, string
-- @overload self, string
-- @function [parent=#ArmatureDataManager] addArmatureFileInfo
-- @param self
-- @param #string str

View File

@ -15,10 +15,8 @@
-- @return BatchNode#BatchNode ret (return value: ccs.BatchNode)
--------------------------------
-- overload function: addChild(cc.Node, int, string)
--
-- overload function: addChild(cc.Node, int, int)
--
-- @overload self, cc.Node, int, string
-- @overload self, cc.Node, int, int
-- @function [parent=#BatchNode] addChild
-- @param self
-- @param #cc.Node node

View File

@ -73,10 +73,8 @@
-- @param #ccs.BoneData bonedata
--------------------------------
-- overload function: init(string)
--
-- overload function: init()
--
-- @overload self, string
-- @overload self
-- @function [parent=#Bone] init
-- @param self
-- @param #string str
@ -88,10 +86,8 @@
-- @param #ccs.Bone bone
--------------------------------
-- overload function: addDisplay(cc.Node, int)
--
-- overload function: addDisplay(ccs.DisplayData, int)
--
-- @overload self, cc.Node, int
-- @overload self, ccs.DisplayData, int
-- @function [parent=#Bone] addDisplay
-- @param self
-- @param #ccs.DisplayData displaydata
@ -171,10 +167,8 @@
-- @return BoneData#BoneData ret (return value: ccs.BoneData)
--------------------------------
-- overload function: create(string)
--
-- overload function: create()
--
-- @overload self, string
-- @overload self
-- @function [parent=#Bone] create
-- @param self
-- @param #string str

View File

@ -121,10 +121,8 @@
-- @param #bool bool
--------------------------------
-- overload function: create(string, string, string, ccui.Widget::TextureResType)
--
-- overload function: create()
--
-- @overload self, string, string, string, ccui.Widget::TextureResType
-- @overload self
-- @function [parent=#Button] create
-- @param self
-- @param #string str

View File

@ -102,12 +102,9 @@
-- @param #float float
--------------------------------
-- overload function: CCBReader(cc.CCBReader)
--
-- overload function: CCBReader(cc.NodeLoaderLibrary, cc.CCBMemberVariableAssigner, cc.CCBSelectorResolver, cc.NodeLoaderListener)
--
-- overload function: CCBReader()
--
-- @overload self, cc.CCBReader
-- @overload self, cc.NodeLoaderLibrary, cc.CCBMemberVariableAssigner, cc.CCBSelectorResolver, cc.NodeLoaderListener
-- @overload self
-- @function [parent=#CCBReader] CCBReader
-- @param self
-- @param #cc.NodeLoaderLibrary nodeloaderlibrary

View File

@ -60,10 +60,8 @@
-- @param #ccui.Widget::TextureResType texturerestype
--------------------------------
-- overload function: create(string, string, string, string, string, ccui.Widget::TextureResType)
--
-- overload function: create()
--
-- @overload self, string, string, string, string, string, ccui.Widget::TextureResType
-- @overload self
-- @function [parent=#CheckBox] create
-- @param self
-- @param #string str

View File

@ -35,10 +35,8 @@
-- @param #float float
--------------------------------
-- overload function: create(cc.Node)
--
-- overload function: create()
--
-- @overload self, cc.Node
-- @overload self
-- @function [parent=#ClippingNode] create
-- @param self
-- @param #cc.Node node

View File

@ -38,10 +38,8 @@
-- @param self
--------------------------------
-- overload function: stopBackgroundMusic()
--
-- overload function: stopBackgroundMusic(bool)
--
-- @overload self
-- @overload self, bool
-- @function [parent=#ComAudio] stopBackgroundMusic
-- @param self
-- @param #bool bool
@ -74,24 +72,18 @@
-- @param #char char
--------------------------------
-- overload function: playBackgroundMusic(char)
--
-- overload function: playBackgroundMusic(char, bool)
--
-- overload function: playBackgroundMusic()
--
-- @overload self, char
-- @overload self, char, bool
-- @overload self
-- @function [parent=#ComAudio] playBackgroundMusic
-- @param self
-- @param #char char
-- @param #bool bool
--------------------------------
-- overload function: playEffect(char)
--
-- overload function: playEffect(char, bool)
--
-- overload function: playEffect()
--
-- @overload self, char
-- @overload self, char, bool
-- @overload self
-- @function [parent=#ComAudio] playEffect
-- @param self
-- @param #char char

View File

@ -15,10 +15,8 @@
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- overload function: create(cc.Node, char)
--
-- overload function: create()
--
-- @overload self, cc.Node, char
-- @overload self
-- @function [parent=#ComRender] create
-- @param self
-- @param #cc.Node node

View File

@ -105,10 +105,8 @@
-- @param self
--------------------------------
-- overload function: getCurrentTitle()
--
-- overload function: getCurrentTitle()
--
-- @overload self
-- @overload self
-- @function [parent=#ControlButton] getCurrentTitle
-- @param self
-- @return string#string ret (retunr value: string)
@ -219,14 +217,10 @@
-- @return string#string ret (return value: string)
--------------------------------
-- overload function: create(cc.Scale9Sprite)
--
-- overload function: create()
--
-- overload function: create(cc.Node, cc.Scale9Sprite)
--
-- overload function: create(string, string, float)
--
-- @overload self, cc.Scale9Sprite
-- @overload self
-- @overload self, cc.Node, cc.Scale9Sprite
-- @overload self, string, string, float
-- @function [parent=#ControlButton] create
-- @param self
-- @param #string str

View File

@ -80,10 +80,8 @@
-- @return Sprite#Sprite ret (return value: cc.Sprite)
--------------------------------
-- overload function: initWithSprites(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite)
--
-- overload function: initWithSprites(cc.Sprite, cc.Sprite, cc.Sprite)
--
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite
-- @function [parent=#ControlSlider] initWithSprites
-- @param self
-- @param #cc.Sprite sprite
@ -129,14 +127,10 @@
-- @param #float float
--------------------------------
-- overload function: create(cc.Sprite, cc.Sprite, cc.Sprite)
--
-- overload function: create(char, char, char)
--
-- overload function: create(char, char, char, char)
--
-- overload function: create(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite)
--
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite
-- @overload self, char, char, char
-- @overload self, char, char, char, char
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite
-- @function [parent=#ControlSlider] create
-- @param self
-- @param #cc.Sprite sprite

View File

@ -10,10 +10,8 @@
-- @param #bool bool
--------------------------------
-- overload function: setOn(bool)
--
-- overload function: setOn(bool, bool)
--
-- @overload self, bool
-- @overload self, bool, bool
-- @function [parent=#ControlSwitch] setOn
-- @param self
-- @param #bool bool
@ -25,10 +23,8 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- overload function: initWithMaskSprite(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label)
--
-- overload function: initWithMaskSprite(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite)
--
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite
-- @function [parent=#ControlSwitch] initWithMaskSprite
-- @param self
-- @param #cc.Sprite sprite
@ -51,10 +47,8 @@
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- overload function: create(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite)
--
-- overload function: create(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label)
--
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite
-- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label
-- @function [parent=#ControlSwitch] create
-- @param self
-- @param #cc.Sprite sprite

View File

@ -46,20 +46,16 @@
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
-- overload function: addDisplay(cc.Node, int)
--
-- overload function: addDisplay(ccs.DisplayData, int)
--
-- @overload self, cc.Node, int
-- @overload self, ccs.DisplayData, int
-- @function [parent=#DisplayManager] addDisplay
-- @param self
-- @param #ccs.DisplayData displaydata
-- @param #int int
--------------------------------
-- overload function: containPoint(float, float)
--
-- overload function: containPoint(vec2_table)
--
-- @overload self, float, float
-- @overload self, vec2_table
-- @function [parent=#DisplayManager] containPoint
-- @param self
-- @param #float float

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: create(cc.ActionInterval)
--
-- overload function: create(cc.ActionInterval, float)
--
-- @overload self, cc.ActionInterval
-- @overload self, cc.ActionInterval, float
-- @function [parent=#EaseElasticIn] create
-- @param self
-- @param #cc.ActionInterval actioninterval

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: create(cc.ActionInterval)
--
-- overload function: create(cc.ActionInterval, float)
--
-- @overload self, cc.ActionInterval
-- @overload self, cc.ActionInterval, float
-- @function [parent=#EaseElasticInOut] create
-- @param self
-- @param #cc.ActionInterval actioninterval

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: create(cc.ActionInterval)
--
-- overload function: create(cc.ActionInterval, float)
--
-- @overload self, cc.ActionInterval
-- @overload self, cc.ActionInterval, float
-- @function [parent=#EaseElasticOut] create
-- @param self
-- @param #cc.ActionInterval actioninterval

View File

@ -35,10 +35,8 @@
-- @return int#int ret (return value: int)
--------------------------------
-- overload function: EventController(cc.EventController::ControllerEventType, cc.Controller, bool)
--
-- overload function: EventController(cc.EventController::ControllerEventType, cc.Controller, int)
--
-- @overload self, cc.EventController::ControllerEventType, cc.Controller, bool
-- @overload self, cc.EventController::ControllerEventType, cc.Controller, int
-- @function [parent=#EventController] EventController
-- @param self
-- @param #cc.EventController::ControllerEventType controllereventtype

View File

@ -46,10 +46,8 @@
-- @param #vec2_table vec2
--------------------------------
-- overload function: getProperties()
--
-- overload function: getProperties()
--
-- @overload self
-- @overload self
-- @function [parent=#FastTMXLayer] getProperties
-- @param self
-- @return map_table#map_table ret (retunr value: map_table)
@ -66,10 +64,8 @@
-- @param #int int
--------------------------------
-- overload function: setTileGID(int, vec2_table, cc.TMXTileFlags_)
--
-- overload function: setTileGID(int, vec2_table)
--
-- @overload self, int, vec2_table, cc.TMXTileFlags_
-- @overload self, int, vec2_table
-- @function [parent=#FastTMXLayer] setTileGID
-- @param self
-- @param #int int

View File

@ -27,10 +27,8 @@
-- @return TMXObjectGroup#TMXObjectGroup ret (return value: cc.TMXObjectGroup)
--------------------------------
-- overload function: getObjectGroups()
--
-- overload function: getObjectGroups()
--
-- @overload self
-- @overload self
-- @function [parent=#FastTMXTiledMap] getObjectGroups
-- @param self
-- @return array_table#array_table ret (retunr value: array_table)

View File

@ -74,11 +74,13 @@
-- @function [parent=#FileUtils] addSearchResolutionsOrder
-- @param self
-- @param #string str
-- @param #bool bool
--------------------------------
-- @function [parent=#FileUtils] addSearchPath
-- @param self
-- @param #string str
-- @param #bool bool
--------------------------------
-- @function [parent=#FileUtils] isFileExist

View File

@ -33,10 +33,8 @@
-- @return string#string ret (return value: string)
--------------------------------
-- overload function: setUniformsForBuiltins(mat4_table)
--
-- overload function: setUniformsForBuiltins()
--
-- @overload self, mat4_table
-- @overload self
-- @function [parent=#GLProgram] setUniformsForBuiltins
-- @param self
-- @param #mat4_table mat4

View File

@ -5,24 +5,18 @@
-- @parent_module cc
--------------------------------
-- overload function: setUniformTexture(string, unsigned int)
--
-- overload function: setUniformTexture(string, cc.Texture2D)
--
-- overload function: setUniformTexture(int, cc.Texture2D)
--
-- overload function: setUniformTexture(int, unsigned int)
--
-- @overload self, string, unsigned int
-- @overload self, string, cc.Texture2D
-- @overload self, int, cc.Texture2D
-- @overload self, int, unsigned int
-- @function [parent=#GLProgramState] setUniformTexture
-- @param self
-- @param #int int
-- @param #unsigned int int
--------------------------------
-- overload function: setUniformMat4(int, mat4_table)
--
-- overload function: setUniformMat4(string, mat4_table)
--
-- @overload self, int, mat4_table
-- @overload self, string, mat4_table
-- @function [parent=#GLProgramState] setUniformMat4
-- @param self
-- @param #string str
@ -47,30 +41,24 @@
-- @param self
--------------------------------
-- overload function: setUniformFloat(int, float)
--
-- overload function: setUniformFloat(string, float)
--
-- @overload self, int, float
-- @overload self, string, float
-- @function [parent=#GLProgramState] setUniformFloat
-- @param self
-- @param #string str
-- @param #float float
--------------------------------
-- overload function: setUniformVec3(int, vec3_table)
--
-- overload function: setUniformVec3(string, vec3_table)
--
-- @overload self, int, vec3_table
-- @overload self, string, vec3_table
-- @function [parent=#GLProgramState] setUniformVec3
-- @param self
-- @param #string str
-- @param #vec3_table vec3
--------------------------------
-- overload function: setUniformInt(int, int)
--
-- overload function: setUniformInt(string, int)
--
-- @overload self, int, int
-- @overload self, string, int
-- @function [parent=#GLProgramState] setUniformInt
-- @param self
-- @param #string str
@ -82,10 +70,8 @@
-- @return long#long ret (return value: long)
--------------------------------
-- overload function: setUniformVec4(int, vec4_table)
--
-- overload function: setUniformVec4(string, vec4_table)
--
-- @overload self, int, vec4_table
-- @overload self, string, vec4_table
-- @function [parent=#GLProgramState] setUniformVec4
-- @param self
-- @param #string str
@ -97,10 +83,8 @@
-- @param #cc.GLProgram glprogram
--------------------------------
-- overload function: setUniformVec2(int, vec2_table)
--
-- overload function: setUniformVec2(string, vec2_table)
--
-- @overload self, int, vec2_table
-- @overload self, string, vec2_table
-- @function [parent=#GLProgramState] setUniformVec2
-- @param self
-- @param #string str

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create(size_table, cc.Texture2D, bool)
--
-- @overload self, size_table
-- @overload self, size_table, cc.Texture2D, bool
-- @function [parent=#Grid3D] create
-- @param self
-- @param #size_table size

View File

@ -66,10 +66,8 @@
-- @return int#int ret (return value: int)
--------------------------------
-- overload function: initWithSize(size_table)
--
-- overload function: initWithSize(size_table, cc.Texture2D, bool)
--
-- @overload self, size_table
-- @overload self, size_table, cc.Texture2D, bool
-- @function [parent=#GridBase] initWithSize
-- @param self
-- @param #size_table size
@ -92,10 +90,8 @@
-- @param self
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create(size_table, cc.Texture2D, bool)
--
-- @overload self, size_table
-- @overload self, size_table, cc.Texture2D, bool
-- @function [parent=#GridBase] create
-- @param self
-- @param #size_table size

View File

@ -5,10 +5,8 @@
-- @parent_module ccui
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create()
--
-- @overload self, size_table
-- @overload self
-- @function [parent=#HBox] create
-- @param self
-- @param #size_table size

View File

@ -36,10 +36,8 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- overload function: create(string, ccui.Widget::TextureResType)
--
-- overload function: create()
--
-- @overload self, string, ccui.Widget::TextureResType
-- @overload self
-- @function [parent=#ImageView] create
-- @param self
-- @param #string str

View File

@ -127,12 +127,9 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: setCharMap(cc.Texture2D, int, int, int)
--
-- overload function: setCharMap(string, int, int, int)
--
-- overload function: setCharMap(string)
--
-- @overload self, cc.Texture2D, int, int, int
-- @overload self, string, int, int, int
-- @overload self, string
-- @function [parent=#Label] setCharMap
-- @param self
-- @param #string str
@ -228,10 +225,8 @@
-- @param #cc.TextHAlignment texthalignment
--------------------------------
-- overload function: setAlignment(cc.TextHAlignment, cc.TextVAlignment)
--
-- overload function: setAlignment(cc.TextHAlignment)
--
-- @overload self, cc.TextHAlignment, cc.TextVAlignment
-- @overload self, cc.TextHAlignment
-- @function [parent=#Label] setAlignment
-- @param self
-- @param #cc.TextHAlignment texthalignment
@ -253,12 +248,9 @@
-- @return Label#Label ret (return value: cc.Label)
--------------------------------
-- overload function: createWithCharMap(cc.Texture2D, int, int, int)
--
-- overload function: createWithCharMap(string, int, int, int)
--
-- overload function: createWithCharMap(string)
--
-- @overload self, cc.Texture2D, int, int, int
-- @overload self, string, int, int, int
-- @overload self, string
-- @function [parent=#Label] createWithCharMap
-- @param self
-- @param #string str

View File

@ -10,12 +10,9 @@
-- @param #string str
--------------------------------
-- overload function: initWithString(string, string)
--
-- overload function: initWithString(string, string, int, int, int)
--
-- overload function: initWithString(string, cc.Texture2D, int, int, int)
--
-- @overload self, string, string
-- @overload self, string, string, int, int, int
-- @overload self, string, cc.Texture2D, int, int, int
-- @function [parent=#LabelAtlas] initWithString
-- @param self
-- @param #string str
@ -35,12 +32,9 @@
-- @return string#string ret (return value: string)
--------------------------------
-- overload function: create(string, string, int, int, int)
--
-- overload function: create()
--
-- overload function: create(string, string)
--
-- @overload self, string, string, int, int, int
-- @overload self
-- @overload self, string, string
-- @function [parent=#LabelAtlas] create
-- @param self
-- @param #string str

View File

@ -21,12 +21,9 @@
-- @param #float float
--------------------------------
-- overload function: create(color4b_table, float, float)
--
-- overload function: create()
--
-- overload function: create(color4b_table)
--
-- @overload self, color4b_table, float, float
-- @overload self
-- @overload self, color4b_table
-- @function [parent=#LayerColor] create
-- @param self
-- @param #color4b_table color4b

View File

@ -65,12 +65,9 @@
-- @param #color3b_table color3b
--------------------------------
-- overload function: create(color4b_table, color4b_table)
--
-- overload function: create()
--
-- overload function: create(color4b_table, color4b_table, vec2_table)
--
-- @overload self, color4b_table, color4b_table
-- @overload self
-- @overload self, color4b_table, color4b_table, vec2_table
-- @function [parent=#LayerGradient] create
-- @param self
-- @param #color4b_table color4b

View File

@ -70,10 +70,8 @@
-- @param #ccui.Widget::TextureResType texturerestype
--------------------------------
-- overload function: setBackGroundColor(color3b_table, color3b_table)
--
-- overload function: setBackGroundColor(color3b_table)
--
-- @overload self, color3b_table, color3b_table
-- @overload self, color3b_table
-- @function [parent=#Layout] setBackGroundColor
-- @param self
-- @param #color3b_table color3b
@ -179,14 +177,10 @@
-- @return Ref#Ref ret (return value: cc.Ref)
--------------------------------
-- overload function: addChild(cc.Node, int)
--
-- overload function: addChild(cc.Node)
--
-- overload function: addChild(cc.Node, int, int)
--
-- overload function: addChild(cc.Node, int, string)
--
-- @overload self, cc.Node, int
-- @overload self, cc.Node
-- @overload self, cc.Node, int, int
-- @overload self, cc.Node, int, string
-- @function [parent=#Layout] addChild
-- @param self
-- @param #cc.Node node

View File

@ -107,14 +107,10 @@
-- @return Ref#Ref ret (return value: cc.Ref)
--------------------------------
-- overload function: addChild(cc.Node, int)
--
-- overload function: addChild(cc.Node)
--
-- overload function: addChild(cc.Node, int, int)
--
-- overload function: addChild(cc.Node, int, string)
--
-- @overload self, cc.Node, int
-- @overload self, cc.Node
-- @overload self, cc.Node, int, int
-- @overload self, cc.Node, int, string
-- @function [parent=#ListView] addChild
-- @param self
-- @param #cc.Node node

View File

@ -51,10 +51,8 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: create(string, float)
--
-- overload function: create()
--
-- @overload self, string, float
-- @overload self
-- @function [parent=#LoadingBar] create
-- @param self
-- @param #string str

View File

@ -33,14 +33,10 @@
-- @param self
--------------------------------
-- overload function: addChild(cc.Node, int)
--
-- overload function: addChild(cc.Node)
--
-- overload function: addChild(cc.Node, int, int)
--
-- overload function: addChild(cc.Node, int, string)
--
-- @overload self, cc.Node, int
-- @overload self, cc.Node
-- @overload self, cc.Node, int, int
-- @overload self, cc.Node, int, string
-- @function [parent=#Menu] addChild
-- @param self
-- @param #cc.Node node

View File

@ -44,10 +44,8 @@
-- @param #bool bool
--------------------------------
-- overload function: create(float, float, float, color3b_table, cc.Texture2D)
--
-- overload function: create(float, float, float, color3b_table, string)
--
-- @overload self, float, float, float, color3b_table, cc.Texture2D
-- @overload self, float, float, float, color3b_table, string
-- @function [parent=#MotionStreak] create
-- @param self
-- @param #float float
@ -98,20 +96,16 @@
-- @return unsigned char#unsigned char ret (return value: unsigned char)
--------------------------------
-- overload function: setPosition(float, float)
--
-- overload function: setPosition(vec2_table)
--
-- @overload self, float, float
-- @overload self, vec2_table
-- @function [parent=#MotionStreak] setPosition
-- @param self
-- @param #float float
-- @param #float float
--------------------------------
-- overload function: getPosition(float, float)
--
-- overload function: getPosition()
--
-- @overload self, float, float
-- @overload self
-- @function [parent=#MotionStreak] getPosition
-- @param self
-- @param #float float

View File

@ -5,14 +5,10 @@
-- @parent_module cc
--------------------------------
-- overload function: addChild(cc.Node, int)
--
-- overload function: addChild(cc.Node)
--
-- overload function: addChild(cc.Node, int, int)
--
-- overload function: addChild(cc.Node, int, string)
--
-- @overload self, cc.Node, int
-- @overload self, cc.Node
-- @overload self, cc.Node, int, int
-- @overload self, cc.Node, int, string
-- @function [parent=#Node] addChild
-- @param self
-- @param #cc.Node node
@ -51,10 +47,8 @@
-- @param #bool bool
--------------------------------
-- overload function: getChildren()
--
-- overload function: getChildren()
--
-- @overload self
-- @overload self
-- @function [parent=#Node] getChildren
-- @param self
-- @return array_table#array_table ret (retunr value: array_table)
@ -134,11 +128,6 @@
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#Node] getonEnterTransitionDidFinishCallback
-- @param self
-- @return function#function ret (return value: function)
--------------------------------
-- @function [parent=#Node] getGLProgram
-- @param self
@ -213,10 +202,8 @@
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- overload function: removeAllChildrenWithCleanup(bool)
--
-- overload function: removeAllChildrenWithCleanup()
--
-- @overload self, bool
-- @overload self
-- @function [parent=#Node] removeAllChildrenWithCleanup
-- @param self
-- @param #bool bool
@ -257,11 +244,6 @@
-- @param #cc.Touch touch
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Node] getOnEnterCallback
-- @param self
-- @return function#function ret (return value: function)
--------------------------------
-- @function [parent=#Node] convertToNodeSpace
-- @param self
@ -278,10 +260,8 @@
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
--------------------------------
-- overload function: setPosition(float, float)
--
-- overload function: setPosition(vec2_table)
--
-- @overload self, float, float
-- @overload self, vec2_table
-- @function [parent=#Node] setPosition
-- @param self
-- @param #float float
@ -391,10 +371,8 @@
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- overload function: visit()
--
-- overload function: visit(cc.Renderer, mat4_table, unsigned int)
--
-- @overload self
-- @overload self, cc.Renderer, mat4_table, unsigned int
-- @function [parent=#Node] visit
-- @param self
-- @param #cc.Renderer renderer
@ -448,10 +426,8 @@
-- @param #string str
--------------------------------
-- overload function: setAdditionalTransform(cc.AffineTransform)
--
-- overload function: setAdditionalTransform(mat4_table)
--
-- @overload self, cc.AffineTransform
-- @overload self, mat4_table
-- @function [parent=#Node] setAdditionalTransform
-- @param self
-- @param #mat4_table mat4
@ -467,10 +443,8 @@
-- @return int#int ret (return value: int)
--------------------------------
-- overload function: getScheduler()
--
-- overload function: getScheduler()
--
-- @overload self
-- @overload self
-- @function [parent=#Node] getScheduler
-- @param self
-- @return Scheduler#Scheduler ret (retunr value: cc.Scheduler)
@ -501,10 +475,8 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- overload function: getParent()
--
-- overload function: getParent()
--
-- @overload self
-- @overload self
-- @function [parent=#Node] getParent
-- @param self
-- @return Node#Node ret (retunr value: cc.Node)
@ -561,20 +533,13 @@
-- @param #float float
--------------------------------
-- overload function: setScale(float, float)
--
-- overload function: setScale(float)
--
-- @overload self, float, float
-- @overload self, float
-- @function [parent=#Node] setScale
-- @param self
-- @param #float float
-- @param #float float
--------------------------------
-- @function [parent=#Node] getOnExitCallback
-- @param self
-- @return function#function ret (return value: function)
--------------------------------
-- @function [parent=#Node] getChildByTag
-- @param self
@ -657,10 +622,8 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: draw()
--
-- overload function: draw(cc.Renderer, mat4_table, unsigned int)
--
-- @overload self
-- @overload self, cc.Renderer, mat4_table, unsigned int
-- @function [parent=#Node] draw
-- @param self
-- @param #cc.Renderer renderer
@ -673,15 +636,8 @@
-- @param #cc.Ref ref
--------------------------------
-- @function [parent=#Node] getonExitTransitionDidStartCallback
-- @param self
-- @return function#function ret (return value: function)
--------------------------------
-- overload function: removeFromParentAndCleanup(bool)
--
-- overload function: removeFromParentAndCleanup()
--
-- @overload self, bool
-- @overload self
-- @function [parent=#Node] removeFromParentAndCleanup
-- @param self
-- @param #bool bool
@ -741,10 +697,8 @@
-- @param #cc.Action action
--------------------------------
-- overload function: getActionManager()
--
-- overload function: getActionManager()
--
-- @overload self
-- @overload self
-- @function [parent=#Node] getActionManager
-- @param self
-- @return ActionManager#ActionManager ret (retunr value: cc.ActionManager)

View File

@ -10,10 +10,8 @@
-- @param #cc.Node node
--------------------------------
-- overload function: getGrid()
--
-- overload function: getGrid()
--
-- @overload self
-- @overload self
-- @function [parent=#NodeGrid] getGrid
-- @param self
-- @return GridBase#GridBase ret (retunr value: cc.GridBase)

View File

@ -23,10 +23,8 @@
-- @return ParallaxNode#ParallaxNode ret (return value: cc.ParallaxNode)
--------------------------------
-- overload function: addChild(cc.Node, int, string)
--
-- overload function: addChild(cc.Node, int, int)
--
-- @overload self, cc.Node, int, string
-- @overload self, cc.Node, int, int
-- @function [parent=#ParallaxNode] addChild
-- @param self
-- @param #cc.Node node

View File

@ -61,10 +61,8 @@
-- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode)
--------------------------------
-- overload function: addChild(cc.Node, int, string)
--
-- overload function: addChild(cc.Node, int, int)
--
-- @overload self, cc.Node, int, string
-- @overload self, cc.Node, int, int
-- @function [parent=#ParticleBatchNode] addChild
-- @param self
-- @param #cc.Node node

View File

@ -21,12 +21,9 @@
-- @param #cc.EventCustom eventcustom
--------------------------------
-- overload function: create(string)
--
-- overload function: create()
--
-- overload function: create(map_table)
--
-- @overload self, string
-- @overload self
-- @overload self, map_table
-- @function [parent=#ParticleSystemQuad] create
-- @param self
-- @param #map_table map

View File

@ -49,10 +49,8 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: applyImpulse(vec2_table, vec2_table)
--
-- overload function: applyImpulse(vec2_table)
--
-- @overload self, vec2_table, vec2_table
-- @overload self, vec2_table
-- @function [parent=#PhysicsBody] applyImpulse
-- @param self
-- @param #vec2_table vec2
@ -64,10 +62,8 @@
-- @param #float float
--------------------------------
-- overload function: applyForce(vec2_table, vec2_table)
--
-- overload function: applyForce(vec2_table)
--
-- @overload self, vec2_table, vec2_table
-- @overload self, vec2_table
-- @function [parent=#PhysicsBody] applyForce
-- @param self
-- @param #vec2_table vec2
@ -222,10 +218,8 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- overload function: removeShape(int, bool)
--
-- overload function: removeShape(cc.PhysicsShape, bool)
--
-- @overload self, int, bool
-- @overload self, cc.PhysicsShape, bool
-- @function [parent=#PhysicsBody] removeShape
-- @param self
-- @param #cc.PhysicsShape physicsshape
@ -346,12 +340,9 @@
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
--------------------------------
-- overload function: create(float)
--
-- overload function: create()
--
-- overload function: create(float, float)
--
-- @overload self, float
-- @overload self
-- @overload self, float, float
-- @function [parent=#PhysicsBody] create
-- @param self
-- @param #float float

View File

@ -45,10 +45,8 @@
-- @param #float float
--------------------------------
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table, float, float)
--
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table)
--
-- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table, float, float
-- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table
-- @function [parent=#PhysicsJointLimit] construct
-- @param self
-- @param #cc.PhysicsBody physicsbody

View File

@ -25,10 +25,8 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody)
--
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, float, float)
--
-- @overload self, cc.PhysicsBody, cc.PhysicsBody
-- @overload self, cc.PhysicsBody, cc.PhysicsBody, float, float
-- @function [parent=#PhysicsJointRotaryLimit] construct
-- @param self
-- @param #cc.PhysicsBody physicsbody

View File

@ -24,10 +24,8 @@
-- @return float#float ret (return value: float)
--------------------------------
-- overload function: removeBody(int)
--
-- overload function: removeBody(cc.PhysicsBody)
--
-- @overload self, int
-- @overload self, cc.PhysicsBody
-- @function [parent=#PhysicsWorld] removeBody
-- @param self
-- @param #cc.PhysicsBody physicsbody

View File

@ -45,10 +45,8 @@
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- overload function: setReverseDirection(bool)
--
-- overload function: setReverseDirection(bool)
--
-- @overload self, bool
-- @overload self, bool
-- @function [parent=#ProgressTimer] setReverseDirection
-- @param self
-- @param #bool bool

View File

@ -5,12 +5,9 @@
-- @parent_module cc
--------------------------------
-- overload function: addProtectedChild(cc.Node, int)
--
-- overload function: addProtectedChild(cc.Node)
--
-- overload function: addProtectedChild(cc.Node, int, int)
--
-- @overload self, cc.Node, int
-- @overload self, cc.Node
-- @overload self, cc.Node, int, int
-- @function [parent=#ProtectedNode] addProtectedChild
-- @param self
-- @param #cc.Node node

View File

@ -5,10 +5,8 @@
-- @parent_module ccui
--------------------------------
-- overload function: create(size_table)
--
-- overload function: create()
--
-- @overload self, size_table
-- @overload self
-- @function [parent=#RelativeBox] create
-- @param self
-- @param #size_table size

View File

@ -65,10 +65,8 @@
-- @param self
--------------------------------
-- overload function: saveToFile(string, cc.Image::Format, bool)
--
-- overload function: saveToFile(string, bool)
--
-- @overload self, string, cc.Image::Format, bool
-- @overload self, string, bool
-- @function [parent=#RenderTexture] saveToFile
-- @param self
-- @param #string str
@ -91,12 +89,9 @@
-- @param self
--------------------------------
-- overload function: beginWithClear(float, float, float, float, float)
--
-- overload function: beginWithClear(float, float, float, float)
--
-- overload function: beginWithClear(float, float, float, float, float, int)
--
-- @overload self, float, float, float, float, float
-- @overload self, float, float, float, float
-- @overload self, float, float, float, float, float, int
-- @function [parent=#RenderTexture] beginWithClear
-- @param self
-- @param #float float
@ -140,10 +135,8 @@
-- @param #float float
--------------------------------
-- overload function: initWithWidthAndHeight(int, int, cc.Texture2D::PixelFormat, unsigned int)
--
-- overload function: initWithWidthAndHeight(int, int, cc.Texture2D::PixelFormat)
--
-- @overload self, int, int, cc.Texture2D::PixelFormat, unsigned int
-- @overload self, int, int, cc.Texture2D::PixelFormat
-- @function [parent=#RenderTexture] initWithWidthAndHeight
-- @param self
-- @param #int int
@ -153,12 +146,9 @@
-- @return bool#bool ret (retunr value: bool)
--------------------------------
-- overload function: create(int, int, cc.Texture2D::PixelFormat)
--
-- overload function: create(int, int, cc.Texture2D::PixelFormat, unsigned int)
--
-- overload function: create(int, int)
--
-- @overload self, int, int, cc.Texture2D::PixelFormat
-- @overload self, int, int, cc.Texture2D::PixelFormat, unsigned int
-- @overload self, int, int
-- @function [parent=#RenderTexture] create
-- @param self
-- @param #int int

View File

@ -35,10 +35,8 @@
-- @param self
--------------------------------
-- overload function: removeElement(ccui.RichElement)
--
-- overload function: removeElement(int)
--
-- @overload self, ccui.RichElement
-- @overload self, int
-- @function [parent=#RichText] removeElement
-- @param self
-- @param #int int

View File

@ -5,12 +5,9 @@
-- @parent_module cc
--------------------------------
-- overload function: create(float, float, float)
--
-- overload function: create(float, float)
--
-- overload function: create(float, vec3_table)
--
-- @overload self, float, float, float
-- @overload self, float, float
-- @overload self, float, vec3_table
-- @function [parent=#RotateBy] create
-- @param self
-- @param #float float

View File

@ -5,10 +5,8 @@
-- @parent_module cc
--------------------------------
-- overload function: create(float, float)
--
-- overload function: create(float, float, float)
--
-- @overload self, float, float
-- @overload self, float, float, float
-- @function [parent=#RotateTo] create
-- @param self
-- @param #float float

View File

@ -16,10 +16,8 @@
-- @param #float float
--------------------------------
-- overload function: initWithSpriteFrameName(string)
--
-- overload function: initWithSpriteFrameName(string, rect_table)
--
-- @overload self, string
-- @overload self, string, rect_table
-- @function [parent=#Scale9Sprite] initWithSpriteFrameName
-- @param self
-- @param #string str
@ -47,10 +45,8 @@
-- @param #cc.SpriteFrame spriteframe
--------------------------------
-- overload function: initWithBatchNode(cc.SpriteBatchNode, rect_table, rect_table)
--
-- overload function: initWithBatchNode(cc.SpriteBatchNode, rect_table, bool, rect_table)
--
-- @overload self, cc.SpriteBatchNode, rect_table, rect_table
-- @overload self, cc.SpriteBatchNode, rect_table, bool, rect_table
-- @function [parent=#Scale9Sprite] initWithBatchNode
-- @param self
-- @param #cc.SpriteBatchNode spritebatchnode
@ -89,14 +85,10 @@
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- overload function: initWithFile(string, rect_table)
--
-- overload function: initWithFile(string, rect_table, rect_table)
--
-- overload function: initWithFile(rect_table, string)
--
-- overload function: initWithFile(string)
--
-- @overload self, string, rect_table
-- @overload self, string, rect_table, rect_table
-- @overload self, rect_table, string
-- @overload self, string
-- @function [parent=#Scale9Sprite] initWithFile
-- @param self
-- @param #string str
@ -115,10 +107,8 @@
-- @param #float float
--------------------------------
-- overload function: initWithSpriteFrame(cc.SpriteFrame)
--
-- overload function: initWithSpriteFrame(cc.SpriteFrame, rect_table)
--
-- @overload self, cc.SpriteFrame
-- @overload self, cc.SpriteFrame, rect_table
-- @function [parent=#Scale9Sprite] initWithSpriteFrame
-- @param self
-- @param #cc.SpriteFrame spriteframe
@ -146,16 +136,11 @@
-- @param #float float
--------------------------------
-- overload function: create(string, rect_table, rect_table)
--
-- overload function: create()
--
-- overload function: create(rect_table, string)
--
-- overload function: create(string, rect_table)
--
-- overload function: create(string)
--
-- @overload self, string, rect_table, rect_table
-- @overload self
-- @overload self, rect_table, string
-- @overload self, string, rect_table
-- @overload self, string
-- @function [parent=#Scale9Sprite] create
-- @param self
-- @param #string str
@ -164,10 +149,8 @@
-- @return Scale9Sprite#Scale9Sprite ret (retunr value: cc.Scale9Sprite)
--------------------------------
-- overload function: createWithSpriteFrameName(string, rect_table)
--
-- overload function: createWithSpriteFrameName(string)
--
-- @overload self, string, rect_table
-- @overload self, string
-- @function [parent=#Scale9Sprite] createWithSpriteFrameName
-- @param self
-- @param #string str
@ -175,10 +158,8 @@
-- @return Scale9Sprite#Scale9Sprite ret (retunr value: cc.Scale9Sprite)
--------------------------------
-- overload function: createWithSpriteFrame(cc.SpriteFrame, rect_table)
--
-- overload function: createWithSpriteFrame(cc.SpriteFrame)
--
-- @overload self, cc.SpriteFrame, rect_table
-- @overload self, cc.SpriteFrame
-- @function [parent=#Scale9Sprite] createWithSpriteFrame
-- @param self
-- @param #cc.SpriteFrame spriteframe

View File

@ -5,12 +5,9 @@
-- @parent_module cc
--------------------------------
-- overload function: create(float, float, float)
--
-- overload function: create(float, float)
--
-- overload function: create(float, float, float, float)
--
-- @overload self, float, float, float
-- @overload self, float, float
-- @overload self, float, float, float, float
-- @function [parent=#ScaleBy] create
-- @param self
-- @param #float float

View File

@ -5,12 +5,9 @@
-- @parent_module cc
--------------------------------
-- overload function: create(float, float, float)
--
-- overload function: create(float, float)
--
-- overload function: create(float, float, float, float)
--
-- @overload self, float, float, float
-- @overload self, float, float
-- @overload self, float, float, float, float
-- @function [parent=#ScaleTo] create
-- @param self
-- @param #float float

View File

@ -41,10 +41,8 @@
-- @param #float float
--------------------------------
-- overload function: addChild(cc.Node, int, string)
--
-- overload function: addChild(cc.Node, int, int)
--
-- @overload self, cc.Node, int, string
-- @overload self, cc.Node, int, int
-- @function [parent=#Scene] addChild
-- @param self
-- @param #cc.Node node

View File

@ -181,14 +181,10 @@
-- @return Ref#Ref ret (return value: cc.Ref)
--------------------------------
-- overload function: addChild(cc.Node, int)
--
-- overload function: addChild(cc.Node)
--
-- overload function: addChild(cc.Node, int, int)
--
-- overload function: addChild(cc.Node, int, string)
--
-- @overload self, cc.Node, int
-- @overload self, cc.Node
-- @overload self, cc.Node, int, int
-- @overload self, cc.Node, int, string
-- @function [parent=#ScrollView] addChild
-- @param self
-- @param #cc.Node node
@ -239,10 +235,8 @@
-- @param #bool bool
--------------------------------
-- overload function: getChildren()
--
-- overload function: getChildren()
--
-- @overload self
-- @overload self
-- @function [parent=#ScrollView] getChildren
-- @param self
-- @return array_table#array_table ret (retunr value: array_table)

View File

@ -19,12 +19,4 @@
-- @function [parent=#SkeletonAnimation] clearTrack
-- @param self
--------------------------------
-- @function [parent=#SkeletonAnimation] onAnimationStateEvent
-- @param self
-- @param #int int
-- @param #spEventType speventtype
-- @param #spEvent spevent
-- @param #int int
return nil

Some files were not shown because too many files have changed in this diff Show More