mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3
This commit is contained in:
commit
6b9e79629f
11
AUTHORS
11
AUTHORS
|
@ -828,6 +828,7 @@ Developers:
|
|||
Added missing Text Font and Placeholder feature of EditBox for Mac platform
|
||||
HttpRequest uses std::function as callback
|
||||
EditBox: mac secure input
|
||||
Fix a bug that can not get/set text in password mode on Mac OS X
|
||||
|
||||
iSevenDays
|
||||
Fixed a bug that the result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG
|
||||
|
@ -887,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
|
||||
|
@ -896,7 +898,8 @@ Developers:
|
|||
|
||||
kyokomi
|
||||
Fix the bug that UIButton doesn't support TTF font
|
||||
Fix a but of TextReader
|
||||
Fix a bug of TextReader
|
||||
Fix a bug that UITextField doesn't support TTF font
|
||||
|
||||
gin0606
|
||||
Add a new line at the end of a file
|
||||
|
@ -911,6 +914,12 @@ Developers:
|
|||
chareice
|
||||
Make `setup.py` work on zsh
|
||||
|
||||
taug
|
||||
Could add seach path and resolution order path in front.
|
||||
|
||||
CaiCQ
|
||||
Fix a but that LabelTTF may lost chinese characters on linux
|
||||
|
||||
Retired Core Developers:
|
||||
WenSheng Yang
|
||||
Author of windows port, CCTextField,
|
||||
|
|
21
CHANGELOG
21
CHANGELOG
|
@ -1,19 +1,32 @@
|
|||
cocos2d-x-3.2 ??
|
||||
cocos2d-x-3.2 Jul.17 2014
|
||||
[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
|
||||
[FIX] Game Controller: joystick y value inversed on iOS
|
||||
[FIX] GLView: cursor position is not correct if design resolution is different from device resolution
|
||||
[FIX] Label: color can not be set correctly if using system font
|
||||
[FIX] Label: color can not be set correctly if using system font on iOS
|
||||
[FIX] LabelTTF: may lost chinese characters on linux
|
||||
[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] Setup.py: not work if using zsh
|
||||
[FIX] Physics integration: body shape will be wrong when using negative value to scale
|
||||
[FIX] ScrollViewDelegate: make the scrollView delegate methods optional
|
||||
[FIX] Setup.py: will crash on windows because of checking `zsh`
|
||||
[FIX] SpriteBatchNode: opacity can not work
|
||||
[FIX] Sprite3D: may crash on Android if playing animation and replace Scene after come from background
|
||||
[FIX] UIdget: opacity is wrong when replace texture
|
||||
[FIX] UIwidget: opacity is wrong when replace texture
|
||||
[FIX] UIRichText: will crash when using utf8 string and the length exceed specified length
|
||||
[FIX] UIText: can not wrap words automatically
|
||||
[FIX] UITextField: keyboard can not hide if touching space outside of keyboard
|
||||
[FIX] UITextField: can not wrap words automatically
|
||||
[FIX] UIVideoPlayer: can not exit full screen mode on Android
|
||||
|
||||
[FIX] Others: don't release singleton objects correctly that are needed in the whole game, which will be treated
|
||||
as memory leak when using VLD.
|
||||
[FIX] Others: compiling error when building for iOS 64-bit devices with Xcode6 beta3
|
||||
|
||||
|
||||
cocos2d-x-3.2rc0 Jul.7 2014
|
||||
|
|
|
@ -7475,15 +7475,6 @@
|
|||
"\"$(SRCROOT)/../external/websockets/prebuilt/ios\"",
|
||||
"\"$(SRCROOT)/../external/curl/prebuilt/ios\"",
|
||||
);
|
||||
"OTHER_LDFLAGS[arch=arm64]" = (
|
||||
"-lcurl_arm64",
|
||||
"-ljpeg_arm64",
|
||||
"-lpng_arm64",
|
||||
"-ltiff_arm64",
|
||||
"-lwebp_arm64",
|
||||
"-lwebsockets_arm64",
|
||||
"-lfreetype_arm64",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios";
|
||||
|
@ -7515,15 +7506,6 @@
|
|||
"\"$(SRCROOT)/../external/websockets/prebuilt/ios\"",
|
||||
"\"$(SRCROOT)/../external/curl/prebuilt/ios\"",
|
||||
);
|
||||
"OTHER_LDFLAGS[arch=arm64]" = (
|
||||
"-lcurl_arm64",
|
||||
"-ljpeg_arm64",
|
||||
"-lpng_arm64",
|
||||
"-ltiff_arm64",
|
||||
"-lwebp_arm64",
|
||||
"-lwebsockets_arm64",
|
||||
"-lfreetype_arm64",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios";
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
1503FAC418DA8B6C00F6518C /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB118DA8B6C00F6518C /* tp.lua */; };
|
||||
1503FAC518DA8B6C00F6518C /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB218DA8B6C00F6518C /* url.lua */; };
|
||||
1503FAC618DA8B6C00F6518C /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB218DA8B6C00F6518C /* url.lua */; };
|
||||
156229331973D400009C9067 /* bitExtend.lua in Resources */ = {isa = PBXBuildFile; fileRef = 156229321973D400009C9067 /* bitExtend.lua */; };
|
||||
156229341973D400009C9067 /* bitExtend.lua in Resources */ = {isa = PBXBuildFile; fileRef = 156229321973D400009C9067 /* bitExtend.lua */; };
|
||||
156EAE071977D0BD00F53709 /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; };
|
||||
15AECE0B195C0F8A00907DB0 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; };
|
||||
15AECE0F195C1FDD00907DB0 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; };
|
||||
15AECE1F195D0EC500907DB0 /* experimentalConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15AECE1E195D0EC500907DB0 /* experimentalConstants.lua */; };
|
||||
|
@ -1393,6 +1396,7 @@
|
|||
1503FAB018DA8B6C00F6518C /* socket.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = socket.lua; path = ../external/lua/luasocket/socket.lua; sourceTree = "<group>"; };
|
||||
1503FAB118DA8B6C00F6518C /* tp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = tp.lua; path = ../external/lua/luasocket/tp.lua; sourceTree = "<group>"; };
|
||||
1503FAB218DA8B6C00F6518C /* url.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = url.lua; path = ../external/lua/luasocket/url.lua; sourceTree = "<group>"; };
|
||||
156229321973D400009C9067 /* bitExtend.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = bitExtend.lua; path = "../cocos/scripting/lua-bindings/script/bitExtend.lua"; sourceTree = "<group>"; };
|
||||
15AECE1E195D0EC500907DB0 /* experimentalConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = experimentalConstants.lua; path = "../cocos/scripting/lua-bindings/script/experimentalConstants.lua"; sourceTree = "<group>"; };
|
||||
15C64822165F391E007D4F18 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
|
||||
15C64824165F3934007D4F18 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/OpenGL.framework; sourceTree = DEVELOPER_DIR; };
|
||||
|
@ -5531,6 +5535,7 @@
|
|||
1ABCA36418CD9E060087CE3A /* Lua Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
156229321973D400009C9067 /* bitExtend.lua */,
|
||||
15AECE1E195D0EC500907DB0 /* experimentalConstants.lua */,
|
||||
1503FAA918DA8B6C00F6518C /* ftp.lua */,
|
||||
1503FAAA18DA8B6C00F6518C /* headers.lua */,
|
||||
|
@ -7866,6 +7871,7 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
156EAE071977D0BD00F53709 /* ActionTimeline in Resources */,
|
||||
15E66FD6192DC8C700C20A52 /* Sprite3DTest in Resources */,
|
||||
1AC35DC318CEE65100F37B72 /* Misc in Resources */,
|
||||
1AC35DC618CEE65100F37B72 /* Shaders in Resources */,
|
||||
|
@ -7897,6 +7903,7 @@
|
|||
15C90B4918E66C2A00D69802 /* tp.lua in Resources */,
|
||||
1AC35DE918CEE65900F37B72 /* effect1.wav in Resources */,
|
||||
1ABCA38E18CD9E180087CE3A /* GuiConstants.lua in Resources */,
|
||||
156229331973D400009C9067 /* bitExtend.lua in Resources */,
|
||||
15C90B3F18E66C0C00D69802 /* ltn12.lua in Resources */,
|
||||
15C90B4718E66C2400D69802 /* socket.lua in Resources */,
|
||||
15C90B3A18E66BE200D69802 /* ftp.lua in Resources */,
|
||||
|
@ -7939,6 +7946,7 @@
|
|||
15B0870D195AD52000D6F62B /* ActionTimeline in Resources */,
|
||||
15E66FC8192D957100C20A52 /* Sprite3DTest in Resources */,
|
||||
15C90B4418E66C1800D69802 /* mime.lua in Resources */,
|
||||
156229341973D400009C9067 /* bitExtend.lua in Resources */,
|
||||
15C90B4C18E66C3100D69802 /* url.lua in Resources */,
|
||||
1AC35DD618CEE65200F37B72 /* Misc in Resources */,
|
||||
1ABCA37B18CD9E180087CE3A /* CCBReaderLoad.lua in Resources */,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,13 +176,15 @@ 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
|
||||
|
||||
#endif //__CCTMX_TILE_MAP2_H__
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "2d/CCFontAtlasCache.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "2d/CCFontFNT.h"
|
||||
#include "2d/CCFontFreeType.h"
|
||||
#include "CCFontCharMap.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#ifndef _CCFontAtlasCache_h_
|
||||
#define _CCFontAtlasCache_h_
|
||||
|
||||
#include <iostream>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "2d/CCFontAtlas.h"
|
||||
|
|
|
@ -186,7 +186,7 @@ bool LabelTextFormatter::alignText(Label *theLabel)
|
|||
int i = 0;
|
||||
|
||||
int lineNumber = 0;
|
||||
int strLen = static_cast<int>(theLabel->_currentUTF16String.length());
|
||||
int strLen = theLabel->_limitShowCount;
|
||||
std::vector<char16_t> lastLine;
|
||||
auto strWhole = theLabel->_currentUTF16String;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -94,6 +94,9 @@ RenderTexture::~RenderTexture()
|
|||
|
||||
void RenderTexture::listenToBackground(EventCustom *event)
|
||||
{
|
||||
// We have not found a way to dispatch the enter background message before the texture data are destroyed.
|
||||
// So we disable this pair of message handler at present.
|
||||
#if 0
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
CC_SAFE_DELETE(_UITextureImage);
|
||||
|
||||
|
@ -118,10 +121,12 @@ void RenderTexture::listenToBackground(EventCustom *event)
|
|||
glDeleteFramebuffers(1, &_FBO);
|
||||
_FBO = 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void RenderTexture::listenToForeground(EventCustom *event)
|
||||
{
|
||||
#if 0
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// -- regenerate frame buffer object and attach the texture
|
||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO);
|
||||
|
@ -139,6 +144,7 @@ void RenderTexture::listenToForeground(EventCustom *event)
|
|||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getName(), 0);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
RenderTexture * RenderTexture::create(int w, int h, Texture2D::PixelFormat eFormat)
|
||||
|
@ -564,6 +570,14 @@ void RenderTexture::onBegin()
|
|||
Mat4::createOrthographicOffCenter((float)-1.0 / widthRatio, (float)1.0 / widthRatio, (float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1, 1, &orthoMatrix);
|
||||
director->multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, orthoMatrix);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
|
||||
Mat4 modifiedProjection = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
|
||||
modifiedProjection = CCEGLView::sharedOpenGLView()->getReverseOrientationMatrix() * modifiedProjection;
|
||||
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, modifiedProjection);
|
||||
#endif
|
||||
}
|
||||
|
||||
//calculate viewport
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ public:
|
|||
//
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionRotoZoom();
|
||||
virtual ~TransitionRotoZoom();
|
||||
|
||||
|
@ -175,7 +175,7 @@ public:
|
|||
//
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionJumpZoom();
|
||||
virtual ~TransitionJumpZoom();
|
||||
|
||||
|
@ -201,10 +201,11 @@ public:
|
|||
//
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionMoveInL();
|
||||
virtual ~TransitionMoveInL();
|
||||
|
||||
protected:
|
||||
/** initializes the scenes */
|
||||
virtual void initScenes();
|
||||
|
||||
|
@ -220,10 +221,11 @@ class CC_DLL TransitionMoveInR : public TransitionMoveInL
|
|||
public:
|
||||
static TransitionMoveInR* create(float t, Scene* scene);
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionMoveInR();
|
||||
virtual ~TransitionMoveInR();
|
||||
|
||||
protected:
|
||||
virtual void initScenes();
|
||||
|
||||
private:
|
||||
|
@ -238,10 +240,11 @@ class CC_DLL TransitionMoveInT : public TransitionMoveInL
|
|||
public:
|
||||
static TransitionMoveInT* create(float t, Scene* scene);
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionMoveInT();
|
||||
virtual ~TransitionMoveInT();
|
||||
|
||||
protected:
|
||||
virtual void initScenes();
|
||||
|
||||
private:
|
||||
|
@ -256,10 +259,11 @@ class CC_DLL TransitionMoveInB : public TransitionMoveInL
|
|||
public:
|
||||
static TransitionMoveInB* create(float t, Scene* scene);
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionMoveInB();
|
||||
virtual ~TransitionMoveInB();
|
||||
|
||||
protected:
|
||||
virtual void initScenes();
|
||||
|
||||
private:
|
||||
|
@ -284,10 +288,11 @@ public:
|
|||
//
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionSlideInL();
|
||||
virtual ~TransitionSlideInL();
|
||||
|
||||
protected:
|
||||
/** initializes the scenes */
|
||||
virtual void initScenes(void);
|
||||
|
||||
|
@ -308,10 +313,11 @@ public:
|
|||
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||
virtual ActionInterval* action(void);
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionSlideInR();
|
||||
virtual ~TransitionSlideInR();
|
||||
|
||||
protected:
|
||||
/** initializes the scenes */
|
||||
virtual void initScenes(void);
|
||||
|
||||
|
@ -332,10 +338,11 @@ public:
|
|||
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||
virtual ActionInterval* action(void);
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionSlideInB();
|
||||
virtual ~TransitionSlideInB();
|
||||
|
||||
protected:
|
||||
/** initializes the scenes */
|
||||
virtual void initScenes();
|
||||
|
||||
|
@ -356,10 +363,11 @@ public:
|
|||
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||
virtual ActionInterval* action(void);
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionSlideInT();
|
||||
virtual ~TransitionSlideInT();
|
||||
|
||||
protected:
|
||||
/** initializes the scenes */
|
||||
virtual void initScenes(void);
|
||||
|
||||
|
@ -387,7 +395,7 @@ public:
|
|||
virtual void onEnter() override;
|
||||
virtual ActionInterval* easeActionWithAction(ActionInterval * action) override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionShrinkGrow();
|
||||
virtual ~TransitionShrinkGrow();
|
||||
|
||||
|
@ -414,7 +422,7 @@ public:
|
|||
*/
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFlipX();
|
||||
virtual ~TransitionFlipX();
|
||||
|
||||
|
@ -441,7 +449,7 @@ public:
|
|||
*/
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFlipY();
|
||||
virtual ~TransitionFlipY();
|
||||
|
||||
|
@ -468,7 +476,7 @@ public:
|
|||
*/
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFlipAngular();
|
||||
virtual ~TransitionFlipAngular();
|
||||
|
||||
|
@ -495,7 +503,7 @@ public:
|
|||
*/
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionZoomFlipX();
|
||||
virtual ~TransitionZoomFlipX();
|
||||
|
||||
|
@ -522,7 +530,7 @@ public:
|
|||
*/
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionZoomFlipY();
|
||||
virtual ~TransitionZoomFlipY();
|
||||
|
||||
|
@ -549,7 +557,7 @@ public:
|
|||
*/
|
||||
virtual void onEnter() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionZoomFlipAngular();
|
||||
virtual ~TransitionZoomFlipAngular();
|
||||
|
||||
|
@ -625,7 +633,7 @@ public :
|
|||
*/
|
||||
virtual void onExit() override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionCrossFade();
|
||||
virtual ~TransitionCrossFade();
|
||||
|
||||
|
@ -653,10 +661,11 @@ public :
|
|||
virtual ActionInterval * easeActionWithAction(ActionInterval * action) override;
|
||||
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionTurnOffTiles();
|
||||
virtual ~TransitionTurnOffTiles();
|
||||
|
||||
protected:
|
||||
virtual void sceneOrder() override;
|
||||
NodeGrid* _outSceneProxy;
|
||||
|
||||
|
@ -685,9 +694,12 @@ public:
|
|||
virtual ActionInterval * easeActionWithAction(ActionInterval * action) override;
|
||||
virtual void onExit() override;
|
||||
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
||||
protected:
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionSplitCols();
|
||||
virtual ~TransitionSplitCols();
|
||||
|
||||
protected:
|
||||
void switchTargetToInscene();
|
||||
NodeGrid* _gridProxy;
|
||||
private:
|
||||
|
@ -707,7 +719,7 @@ public:
|
|||
//
|
||||
virtual ActionInterval* action(void) override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionSplitRows();
|
||||
virtual ~TransitionSplitRows();
|
||||
|
||||
|
@ -736,10 +748,12 @@ public:
|
|||
virtual ActionInterval* easeActionWithAction(ActionInterval * action) override;
|
||||
virtual void onExit() override;
|
||||
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
||||
protected:
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFadeTR();
|
||||
virtual ~TransitionFadeTR();
|
||||
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
||||
NodeGrid* _outSceneProxy;
|
||||
|
@ -761,7 +775,7 @@ public:
|
|||
//
|
||||
virtual ActionInterval* actionWithSize(const Size& size) override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFadeBL();
|
||||
virtual ~TransitionFadeBL();
|
||||
|
||||
|
@ -782,7 +796,7 @@ public:
|
|||
//
|
||||
virtual ActionInterval* actionWithSize(const Size& size) override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFadeUp();
|
||||
virtual ~TransitionFadeUp();
|
||||
|
||||
|
@ -803,7 +817,7 @@ public:
|
|||
//
|
||||
virtual ActionInterval* actionWithSize(const Size& size) override;
|
||||
|
||||
protected:
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionFadeDown();
|
||||
virtual ~TransitionFadeDown();
|
||||
|
||||
|
|
|
@ -59,15 +59,6 @@ public:
|
|||
* scene is being turned from left over the outgoing scene.
|
||||
*/
|
||||
static TransitionPageTurn* create(float t,Scene* scene,bool backwards);
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionPageTurn();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~TransitionPageTurn();
|
||||
|
||||
//
|
||||
// Overrides
|
||||
|
@ -89,6 +80,17 @@ public:
|
|||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionPageTurn();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~TransitionPageTurn();
|
||||
|
||||
protected:
|
||||
virtual void sceneOrder() override;
|
||||
|
||||
|
|
|
@ -44,14 +44,16 @@ class CC_DLL TransitionProgress : public TransitionScene
|
|||
public:
|
||||
static TransitionProgress* create(float t, Scene* scene);
|
||||
|
||||
TransitionProgress();
|
||||
|
||||
//
|
||||
// Overrides
|
||||
//
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
TransitionProgress();
|
||||
virtual ~TransitionProgress(){}
|
||||
|
||||
protected:
|
||||
virtual void sceneOrder() override;
|
||||
|
||||
|
@ -74,6 +76,13 @@ class CC_DLL TransitionProgressRadialCCW : public TransitionProgress
|
|||
public:
|
||||
static TransitionProgressRadialCCW* create(float t, Scene* scene);
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionProgressRadialCCW(){}
|
||||
virtual ~TransitionProgressRadialCCW(){}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Overrides
|
||||
|
@ -91,6 +100,13 @@ class CC_DLL TransitionProgressRadialCW : public TransitionProgress
|
|||
public:
|
||||
static TransitionProgressRadialCW* create(float t, Scene* scene);
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionProgressRadialCW(){}
|
||||
virtual ~TransitionProgressRadialCW(){}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Overrides
|
||||
|
@ -107,6 +123,13 @@ class CC_DLL TransitionProgressHorizontal : public TransitionProgress
|
|||
public:
|
||||
static TransitionProgressHorizontal* create(float t, Scene* scene);
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionProgressHorizontal(){}
|
||||
virtual ~TransitionProgressHorizontal(){}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Overrides
|
||||
|
@ -119,6 +142,13 @@ class CC_DLL TransitionProgressVertical : public TransitionProgress
|
|||
public:
|
||||
static TransitionProgressVertical* create(float t, Scene* scene);
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionProgressVertical(){}
|
||||
virtual ~TransitionProgressVertical(){}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Overrides
|
||||
|
@ -131,6 +161,13 @@ class CC_DLL TransitionProgressInOut : public TransitionProgress
|
|||
public:
|
||||
static TransitionProgressInOut* create(float t, Scene* scene);
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionProgressInOut(){}
|
||||
virtual ~TransitionProgressInOut(){}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Overrides
|
||||
|
@ -145,6 +182,13 @@ class CC_DLL TransitionProgressOutIn : public TransitionProgress
|
|||
public:
|
||||
static TransitionProgressOutIn* create(float t, Scene* scene);
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TransitionProgressOutIn(){}
|
||||
virtual ~TransitionProgressOutIn(){}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Overrides
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -223,9 +223,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
|
|||
|
||||
# define the macro to compile through support/zip_support/ioapi.c
|
||||
LOCAL_CFLAGS := -DUSE_FILE32API
|
||||
LOCAL_CPPFLAGS := -Wno-deprecated-declarations
|
||||
LOCAL_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat
|
||||
LOCAL_EXPORT_CFLAGS := -DUSE_FILE32API
|
||||
LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations
|
||||
LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -196,7 +196,7 @@ void Controller::registerListeners()
|
|||
};
|
||||
|
||||
_impl->_gcController.extendedGamepad.leftThumbstick.yAxis.valueChangedHandler = ^(GCControllerAxisInput *axis, float value){
|
||||
onAxisEvent(Key::JOYSTICK_LEFT_Y, value, axis.isAnalog);
|
||||
onAxisEvent(Key::JOYSTICK_LEFT_Y, -value, axis.isAnalog);
|
||||
};
|
||||
|
||||
_impl->_gcController.extendedGamepad.rightThumbstick.xAxis.valueChangedHandler = ^(GCControllerAxisInput *axis, float value){
|
||||
|
@ -204,7 +204,7 @@ void Controller::registerListeners()
|
|||
};
|
||||
|
||||
_impl->_gcController.extendedGamepad.rightThumbstick.yAxis.valueChangedHandler = ^(GCControllerAxisInput *axis, float value){
|
||||
onAxisEvent(Key::JOYSTICK_RIGHT_Y, value, axis.isAnalog);
|
||||
onAxisEvent(Key::JOYSTICK_RIGHT_Y, -value, axis.isAnalog);
|
||||
};
|
||||
|
||||
_impl->_gcController.extendedGamepad.valueChangedHandler = ^(GCExtendedGamepad *gamepad, GCControllerElement *element){
|
||||
|
|
|
@ -100,7 +100,7 @@ ssize_t Data::getSize() const
|
|||
return _size;
|
||||
}
|
||||
|
||||
void Data::copy(unsigned char* bytes, const ssize_t size)
|
||||
void Data::copy(const unsigned char* bytes, const ssize_t size)
|
||||
{
|
||||
clear();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
* Developer should free the pointer after invoking this method.
|
||||
* @see Data::fastSet
|
||||
*/
|
||||
void copy(unsigned char* bytes, const ssize_t size);
|
||||
void copy(const unsigned char* bytes, const ssize_t size);
|
||||
|
||||
/** Fast set the buffer pointer and its size. Please use it carefully.
|
||||
* @param bytes The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc',
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
@ -161,6 +164,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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -73,6 +73,11 @@ namespace utils
|
|||
* @since v3.2
|
||||
*/
|
||||
std::vector<Node*> 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
|
||||
|
|
|
@ -31,7 +31,7 @@ NS_CC_BEGIN
|
|||
|
||||
const char* cocos2dVersion()
|
||||
{
|
||||
return "cocos2d-x 3.2beta0";
|
||||
return "cocos2d-x 3.2";
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -157,8 +157,8 @@ void Timeline::binarySearchKeyFrame(int frameIndex)
|
|||
break;
|
||||
}
|
||||
|
||||
int target = -1;
|
||||
int low=0,high=length-1,mid;
|
||||
long target = -1;
|
||||
long low=0,high=length-1,mid=0;
|
||||
while(low<=high){
|
||||
mid=(low+high)/2;
|
||||
if(frameIndex >= _frames.at(mid)->getFrameIndex() && frameIndex < _frames.at(mid+1)->getFrameIndex())
|
||||
|
|
|
@ -42,7 +42,12 @@ ActionManagerEx* ActionManagerEx::getInstance()
|
|||
|
||||
void ActionManagerEx::destroyInstance()
|
||||
{
|
||||
if(sharedActionManager != nullptr)
|
||||
{
|
||||
sharedActionManager->releaseActions();
|
||||
CC_SAFE_DELETE(sharedActionManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ActionManagerEx::ActionManagerEx()
|
||||
|
@ -154,6 +159,13 @@ void ActionManagerEx::releaseActions()
|
|||
for (iter = _actionDic.begin(); iter != _actionDic.end(); iter++)
|
||||
{
|
||||
cocos2d::Vector<ActionObject*> objList = iter->second;
|
||||
int listCount = objList.size();
|
||||
for (int i = 0; i < listCount; i++) {
|
||||
ActionObject* action = objList.at(i);
|
||||
if (action != nullptr) {
|
||||
action->stop();
|
||||
}
|
||||
}
|
||||
objList.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,6 +160,7 @@ void Skin::updateTransform()
|
|||
//
|
||||
// calculate the Quad based on the Affine Matrix
|
||||
//
|
||||
Mat4 transform = getNodeToParentTransform();
|
||||
|
||||
Size &size = _rect.size;
|
||||
|
||||
|
@ -169,13 +170,13 @@ void Skin::updateTransform()
|
|||
float x2 = x1 + size.width;
|
||||
float y2 = y1 + size.height;
|
||||
|
||||
float x = _transform.m[12];
|
||||
float y = _transform.m[13];
|
||||
float x = transform.m[12];
|
||||
float y = transform.m[13];
|
||||
|
||||
float cr = _transform.m[0];
|
||||
float sr = _transform.m[1];
|
||||
float cr2 = _transform.m[5];
|
||||
float sr2 = -_transform.m[4];
|
||||
float cr = transform.m[0];
|
||||
float sr = transform.m[1];
|
||||
float cr2 = transform.m[5];
|
||||
float sr2 = -transform.m[4];
|
||||
float ax = x1 * cr - y1 * sr2 + x;
|
||||
float ay = x1 * sr + y1 * cr2 + y;
|
||||
|
||||
|
|
|
@ -195,27 +195,6 @@ bool CocoLoader::ReadCocoBinBuff(char* pBinBuff)
|
|||
return true;
|
||||
}
|
||||
|
||||
stExpCocoObjectDesc* CocoLoader::GetCocoObjectDesc(const char* szObjDesc)
|
||||
{
|
||||
for(int i = 0 ; i < m_pFileHeader->m_ObjectCount ; i++)
|
||||
{
|
||||
if(0 == strcmp((char*)m_pObjectDescArray[i].m_szName,szObjDesc))
|
||||
{
|
||||
return &m_pObjectDescArray[i];
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
stExpCocoObjectDesc* CocoLoader::GetCocoObjectDesc(int vIndex)
|
||||
{
|
||||
if(vIndex >= 0 && vIndex < m_pFileHeader->m_ObjectCount)
|
||||
{
|
||||
return &m_pObjectDescArray[vIndex];
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
char* CocoLoader::GetMemoryAddr_AttribDesc()
|
||||
{
|
||||
return m_pMemoryBuff + m_pFileHeader->m_lAttribMemAddr ;
|
||||
|
|
|
@ -104,8 +104,6 @@ public:
|
|||
stCocoFileHeader* GetFileHeader(){return m_pFileHeader;}
|
||||
stExpCocoNode* GetRootCocoNode(){return m_pRootNode;}
|
||||
stExpCocoObjectDesc* GetCocoObjectDescArray(){return m_pObjectDescArray;}
|
||||
stExpCocoObjectDesc* GetCocoObjectDesc(const char* szObjDesc);
|
||||
stExpCocoObjectDesc* GetCocoObjectDesc(int vIndex);
|
||||
char* GetMemoryAddr_AttribDesc();
|
||||
char* GetMemoryAddr_CocoNode();
|
||||
char* GetMemoryAddr_String();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -241,8 +241,8 @@ 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;
|
||||
|
@ -255,7 +255,7 @@ void TriggerObj::serialize(const rapidjson::Value &val)
|
|||
{
|
||||
if (str0 != nullptr)
|
||||
{
|
||||
_id = atoi(str0); //(unsigned int)(DICTOOL->getIntValue_json(val, "id"));
|
||||
_id = atoi(str0);
|
||||
}
|
||||
}
|
||||
else if (key.compare("conditions") == 0)
|
||||
|
@ -332,7 +332,7 @@ void TriggerObj::serialize(const rapidjson::Value &val)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace cocostudio
|
|||
};
|
||||
|
||||
valueToFloat = [=](const std::string& str) -> float{
|
||||
return atof(str.c_str());
|
||||
return utils::atof(str.c_str());
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ void PhysicsShapeCircle::update(float delta)
|
|||
|
||||
if (_dirty)
|
||||
{
|
||||
cpFloat factor = PhysicsHelper::float2cpfloat( _newScaleX / _scaleX );
|
||||
cpFloat factor = std::abs(PhysicsHelper::float2cpfloat( _newScaleX / _scaleX ));
|
||||
|
||||
cpShape* shape = _info->getShapes().front();
|
||||
cpVect v = cpCircleShapeGetOffset(shape);
|
||||
|
@ -710,6 +710,17 @@ void PhysicsShapePolygon::update(float delta)
|
|||
vects[i].y *= factorY;
|
||||
}
|
||||
|
||||
// convert hole to clockwise
|
||||
if ( factorX * factorY < 0 )
|
||||
{
|
||||
for (int i = 0; i < count / 2; ++i)
|
||||
{
|
||||
cpVect v = vects[i];
|
||||
vects[i] = vects[count - i - 1];
|
||||
vects[count - i - 1] = v;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
cpVect n = cpvnormalize(cpvperp(cpvsub(vects[i], vects[(i + 1) % count])));
|
||||
|
|
|
@ -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("/");
|
||||
|
||||
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 += "/";
|
||||
}
|
||||
if (front) {
|
||||
_searchPathArray.insert(_searchPathArray.begin(), path);
|
||||
} else {
|
||||
_searchPathArray.push_back(path);
|
||||
}
|
||||
}
|
||||
|
||||
void FileUtils::setFilenameLookupDictionary(const ValueMap& filenameLookupDict)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -270,7 +270,7 @@ public abstract class GameControllerActivity extends Cocos2dxActivity implements
|
|||
mControllerOuya.onResume();
|
||||
}
|
||||
|
||||
mControllerHelper.gatherControllers();
|
||||
GameControllerHelper.gatherControllers(mControllerHelper.mGameController);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
@ -62,6 +61,10 @@ public class GameControllerOuya implements GameControllerDelegate{
|
|||
int deviceId = event.getDeviceId();
|
||||
String deviceName = event.getDevice().getName();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
|
|||
public boolean onKeyDown(final int pKeyCode, final KeyEvent pKeyEvent) {
|
||||
switch (pKeyCode) {
|
||||
case KeyEvent.KEYCODE_BACK:
|
||||
Cocos2dxVideoHelper.mVideoHandler.sendEmptyMessage(Cocos2dxVideoHelper.KeyEventBack);
|
||||
case KeyEvent.KEYCODE_MENU:
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||
|
|
|
@ -40,7 +40,7 @@ public class Cocos2dxVideoHelper {
|
|||
private FrameLayout mLayout = null;
|
||||
private Cocos2dxActivity mActivity = null;
|
||||
private SparseArray<Cocos2dxVideoView> sVideoViews = null;
|
||||
private static VideoHandler mVideoHandler = null;
|
||||
static VideoHandler mVideoHandler = null;
|
||||
|
||||
Cocos2dxVideoHelper(Cocos2dxActivity activity,FrameLayout layout)
|
||||
{
|
||||
|
@ -64,6 +64,8 @@ public class Cocos2dxVideoHelper {
|
|||
private final static int VideoTaskSetVisible = 9;
|
||||
private final static int VideoTaskRestart = 10;
|
||||
private final static int VideoTaskKeepRatio = 11;
|
||||
private final static int VideoTaskFullScreen = 12;
|
||||
final static int KeyEventBack = 1000;
|
||||
|
||||
static class VideoHandler extends Handler{
|
||||
WeakReference<Cocos2dxVideoHelper> mReference;
|
||||
|
@ -101,6 +103,16 @@ public class Cocos2dxVideoHelper {
|
|||
helper._setVideoRect(msg.arg1, rect.left, rect.top, rect.right, rect.bottom);
|
||||
break;
|
||||
}
|
||||
case VideoTaskFullScreen:{
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
Rect rect = (Rect)msg.obj;
|
||||
if (msg.arg2 == 1) {
|
||||
helper._setFullScreenEnabled(msg.arg1, true, rect.right, rect.bottom);
|
||||
} else {
|
||||
helper._setFullScreenEnabled(msg.arg1, false, rect.right, rect.bottom);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VideoTaskPause: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._pauseVideo(msg.arg1);
|
||||
|
@ -144,6 +156,11 @@ public class Cocos2dxVideoHelper {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case KeyEventBack: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper.onBackKeyEvent();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -255,6 +272,38 @@ public class Cocos2dxVideoHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public static void setFullScreenEnabled(int index,boolean enabled, int width,int height) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskFullScreen;
|
||||
msg.arg1 = index;
|
||||
if (enabled) {
|
||||
msg.arg2 = 1;
|
||||
} else {
|
||||
msg.arg2 = 0;
|
||||
}
|
||||
msg.obj = new Rect(0, 0, width, height);
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _setFullScreenEnabled(int index, boolean enabled, int width,int height) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.setFullScreenEnabled(enabled, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
private void onBackKeyEvent() {
|
||||
int viewCount = sVideoViews.size();
|
||||
for (int i = 0; i < viewCount; i++) {
|
||||
int key = sVideoViews.keyAt(i);
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(key);
|
||||
if (videoView != null) {
|
||||
videoView.setFullScreenEnabled(false, 0, 0);
|
||||
mActivity.runOnGLThread(new VideoEventRunnable(key, KeyEventBack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void startVideo(int index) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskStart;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package org.cocos2dx.lib;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
|
@ -27,7 +26,6 @@ import android.media.AudioManager;
|
|||
import android.media.MediaPlayer;
|
||||
import android.media.MediaPlayer.OnErrorListener;
|
||||
import android.net.Uri;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.SurfaceHolder;
|
||||
|
@ -75,7 +73,7 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
// recording the seek position while preparing
|
||||
private int mSeekWhenPrepared;
|
||||
|
||||
protected Context mContext = null;
|
||||
protected Cocos2dxActivity mCocos2dxActivity = null;
|
||||
|
||||
protected int mViewLeft = 0;
|
||||
protected int mViewTop = 0;
|
||||
|
@ -87,27 +85,17 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
protected int mVisibleWidth = 0;
|
||||
protected int mVisibleHeight = 0;
|
||||
|
||||
protected boolean mFullScreenEnabled = false;
|
||||
protected int mFullScreenWidth = 0;
|
||||
protected int mFullScreenHeight = 0;
|
||||
|
||||
private int mViewTag = 0;
|
||||
|
||||
public Cocos2dxVideoView(Context context,int tag) {
|
||||
super(context);
|
||||
public Cocos2dxVideoView(Cocos2dxActivity activity,int tag) {
|
||||
super(activity);
|
||||
|
||||
mViewTag = tag;
|
||||
mContext = context;
|
||||
initVideoView();
|
||||
}
|
||||
|
||||
public Cocos2dxVideoView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
|
||||
mContext = context;
|
||||
initVideoView();
|
||||
}
|
||||
|
||||
public Cocos2dxVideoView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
mContext = context;
|
||||
mCocos2dxActivity = activity;
|
||||
initVideoView();
|
||||
}
|
||||
|
||||
|
@ -115,11 +103,11 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (mVideoWidth == 0 || mVideoHeight == 0) {
|
||||
setMeasuredDimension(mViewWidth, mViewHeight);
|
||||
Log.e(TAG, ""+mViewWidth+ ":" +mViewHeight);
|
||||
Log.i(TAG, ""+mViewWidth+ ":" +mViewHeight);
|
||||
}
|
||||
else {
|
||||
setMeasuredDimension(mVisibleWidth, mVisibleHeight);
|
||||
Log.e(TAG, ""+mVisibleWidth+ ":" +mVisibleHeight);
|
||||
Log.i(TAG, ""+mVisibleWidth+ ":" +mVisibleHeight);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -131,6 +119,18 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
mViewHeight = maxHeight;
|
||||
|
||||
if (mVideoWidth != 0 && mVideoHeight != 0) {
|
||||
fixSize(mViewLeft, mViewTop, mViewWidth, mVideoHeight);
|
||||
}
|
||||
}
|
||||
|
||||
public void setFullScreenEnabled(boolean enabled, int width, int height) {
|
||||
if (mFullScreenEnabled != enabled) {
|
||||
mFullScreenEnabled = enabled;
|
||||
if (width != 0 && height != 0) {
|
||||
mFullScreenWidth = width;
|
||||
mFullScreenHeight = height;
|
||||
}
|
||||
|
||||
fixSize();
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
// TODO: these constants need to be published somewhere in the framework.
|
||||
Intent i = new Intent("com.android.music.musicservicecommand");
|
||||
i.putExtra("command", "pause");
|
||||
mContext.sendBroadcast(i);
|
||||
mCocos2dxActivity.sendBroadcast(i);
|
||||
|
||||
// we shouldn't clear the target state, because somebody might have
|
||||
// called start() previously
|
||||
|
@ -288,10 +288,10 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
mDuration = -1;
|
||||
mCurrentBufferPercentage = 0;
|
||||
if (isAssetRouse) {
|
||||
AssetFileDescriptor afd = mContext.getAssets().openFd(fileName);
|
||||
AssetFileDescriptor afd = mCocos2dxActivity.getAssets().openFd(fileName);
|
||||
mMediaPlayer.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength());
|
||||
} else {
|
||||
mMediaPlayer.setDataSource(mContext, mUri);
|
||||
mMediaPlayer.setDataSource(mCocos2dxActivity, mUri);
|
||||
}
|
||||
|
||||
mMediaPlayer.prepareAsync();
|
||||
|
@ -321,27 +321,35 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
}
|
||||
|
||||
public void fixSize() {
|
||||
if (mViewWidth != 0 && mViewHeight != 0) {
|
||||
if (mKeepRatio) {
|
||||
if ( mVideoWidth * mViewHeight > mViewWidth * mVideoHeight ) {
|
||||
mVisibleWidth = mViewWidth;
|
||||
mVisibleHeight = mViewWidth * mVideoHeight / mVideoWidth;
|
||||
} else if ( mVideoWidth * mViewHeight < mViewWidth * mVideoHeight ) {
|
||||
mVisibleWidth = mViewHeight * mVideoWidth / mVideoHeight;
|
||||
mVisibleHeight = mViewHeight;
|
||||
}
|
||||
mVisibleLeft = mViewLeft + (mViewWidth - mVisibleWidth) / 2;
|
||||
mVisibleTop = mViewTop + (mViewHeight - mVisibleHeight) / 2;
|
||||
if (mFullScreenEnabled) {
|
||||
fixSize(0, 0, mFullScreenWidth, mFullScreenHeight);
|
||||
} else {
|
||||
mVisibleLeft = mViewLeft;
|
||||
mVisibleTop = mViewTop;
|
||||
mVisibleWidth = mViewWidth;
|
||||
mVisibleHeight = mViewHeight;
|
||||
fixSize(mViewLeft, mViewTop, mViewWidth, mVideoHeight);
|
||||
}
|
||||
}
|
||||
|
||||
public void fixSize(int left,int top,int width,int height) {
|
||||
if (width != 0 && height != 0) {
|
||||
if (mKeepRatio) {
|
||||
if ( mVideoWidth * height > width * mVideoHeight ) {
|
||||
mVisibleWidth = width;
|
||||
mVisibleHeight = width * mVideoHeight / mVideoWidth;
|
||||
} else if ( mVideoWidth * height < width * mVideoHeight ) {
|
||||
mVisibleWidth = height * mVideoWidth / mVideoHeight;
|
||||
mVisibleHeight = height;
|
||||
}
|
||||
mVisibleLeft = left + (width - mVisibleWidth) / 2;
|
||||
mVisibleTop = top + (height - mVisibleHeight) / 2;
|
||||
} else {
|
||||
mVisibleLeft = left;
|
||||
mVisibleTop = top;
|
||||
mVisibleWidth = width;
|
||||
mVisibleHeight = height;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mVisibleLeft = mViewLeft;
|
||||
mVisibleTop = mViewTop;
|
||||
mVisibleLeft = left;
|
||||
mVisibleTop = top;
|
||||
mVisibleWidth = mVideoWidth;
|
||||
mVisibleHeight = mVideoHeight;
|
||||
}
|
||||
|
@ -437,7 +445,7 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
* longer have a window, don't bother showing the user an error.
|
||||
*/
|
||||
if (getWindowToken() != null) {
|
||||
Resources r = mContext.getResources();
|
||||
Resources r = mCocos2dxActivity.getResources();
|
||||
int messageId;
|
||||
|
||||
if (framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK) {
|
||||
|
@ -451,7 +459,7 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
|||
int titleId = r.getIdentifier("VideoView_error_title", "string", "android");
|
||||
int buttonStringId = r.getIdentifier("VideoView_error_button", "string", "android");
|
||||
|
||||
new AlertDialog.Builder(mContext)
|
||||
new AlertDialog.Builder(mCocos2dxActivity)
|
||||
.setTitle(r.getString(titleId))
|
||||
.setMessage(messageId)
|
||||
.setPositiveButton(r.getString(buttonStringId),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -215,7 +215,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
if (isspace(unicode)) {
|
||||
if (iswspace(unicode)) {
|
||||
currentPaintPosition += face->glyph->metrics.horiAdvance >> 6;
|
||||
prevGlyphIndex = glyphIndex;
|
||||
prevCharacter = unicode;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,7 @@ LOCAL_SRC_FILES := manual/CCLuaBridge.cpp \
|
|||
manual/lua_cocos2dx_ui_manual.cpp \
|
||||
manual/lua_cocos2dx_spine_manual.cpp \
|
||||
manual/lua_cocos2dx_physics_manual.cpp \
|
||||
manual/lua_cocos2dx_experimental_manual.cpp \
|
||||
manual/lua_cocos2dx_experimental_video_manual.cpp \
|
||||
manual/lua_cocos2dx_deprecated.cpp \
|
||||
manual/lua_xml_http_request.cpp \
|
||||
|
@ -36,6 +37,7 @@ LOCAL_SRC_FILES := manual/CCLuaBridge.cpp \
|
|||
auto/lua_cocos2dx_ui_auto.cpp \
|
||||
auto/lua_cocos2dx_spine_auto.cpp \
|
||||
auto/lua_cocos2dx_physics_auto.cpp \
|
||||
auto/lua_cocos2dx_experimental_auto.cpp \
|
||||
auto/lua_cocos2dx_experimental_video_auto.cpp \
|
||||
../../../external/lua/tolua/tolua_event.c \
|
||||
../../../external/lua/tolua/tolua_is.c \
|
||||
|
|
|
@ -5,6 +5,7 @@ set(LUABINDING_SRC
|
|||
auto/lua_cocos2dx_ui_auto.cpp
|
||||
auto/lua_cocos2dx_spine_auto.cpp
|
||||
auto/lua_cocos2dx_physics_auto.cpp
|
||||
auto/lua_cocos2dx_experimental_auto.cpp
|
||||
manual/tolua_fix.cpp
|
||||
manual/CCLuaBridge.cpp
|
||||
manual/CCLuaEngine.cpp
|
||||
|
@ -24,6 +25,7 @@ set(LUABINDING_SRC
|
|||
manual/lua_cocos2dx_deprecated.cpp
|
||||
manual/lua_xml_http_request.cpp
|
||||
manual/LuaSkeletonAnimation.cpp
|
||||
manual/lua_cocos2dx_experimental_manual.cpp
|
||||
)
|
||||
|
||||
include_directories(
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Application] getTargetPlatform
|
||||
-- @param self
|
||||
-- @return ApplicationProtocol::Platform#ApplicationProtocol::Platform ret (return value: cc.ApplicationProtocol::Platform)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Application] getCurrentLanguageCode
|
||||
|
@ -16,7 +16,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Application] getCurrentLanguage
|
||||
-- @param self
|
||||
-- @return LanguageType#LanguageType ret (return value: cc.LanguageType)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Application] setAnimationInterval
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Bone] getDisplayRenderNodeType
|
||||
-- @param self
|
||||
-- @return DisplayType#DisplayType ret (return value: ccs.DisplayType)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Bone] removeDisplay
|
||||
|
@ -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
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
-- @function [parent=#Button] loadTextureDisabled
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Button] setTitleText
|
||||
|
@ -59,7 +59,7 @@
|
|||
-- @function [parent=#Button] loadTexturePressed
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Button] setTitleFontName
|
||||
|
@ -82,7 +82,7 @@
|
|||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Button] isScale9Enabled
|
||||
|
@ -93,7 +93,7 @@
|
|||
-- @function [parent=#Button] loadTextureNormal
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Button] setCapInsetsPressedRenderer
|
||||
|
@ -121,16 +121,14 @@
|
|||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create(string, string, string, ccui.Widget::TextureResType)
|
||||
--
|
||||
-- overload function: create()
|
||||
--
|
||||
-- @overload self, string, string, string, int
|
||||
-- @overload self
|
||||
-- @function [parent=#Button] create
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
-- @return Button#Button ret (retunr value: ccui.Button)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#CCBAnimationManager] addDocumentCallbackControlEvents
|
||||
-- @param self
|
||||
-- @param #cc.Control::EventType eventtype
|
||||
-- @param #int eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CCBAnimationManager] init
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#CCBReader] addDocumentCallbackControlEvents
|
||||
-- @param self
|
||||
-- @param #cc.Control::EventType eventtype
|
||||
-- @param #int eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CCBReader] setCCBRootPath
|
||||
|
@ -63,7 +63,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#CCBReader] addOwnerCallbackControlEvents
|
||||
-- @param self
|
||||
-- @param #cc.Control::EventType eventtype
|
||||
-- @param #int eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CCBReader] getOwnerOutletNames
|
||||
|
@ -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
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
-- @function [parent=#CheckBox] loadTextureBackGroundSelected
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CheckBox] loadTextureBackGroundDisabled
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CheckBox] addEventListener
|
||||
|
@ -30,7 +30,7 @@
|
|||
-- @function [parent=#CheckBox] loadTextureFrontCross
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CheckBox] loadTextures
|
||||
|
@ -40,13 +40,13 @@
|
|||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CheckBox] loadTextureBackGround
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CheckBox] setSelectedState
|
||||
|
@ -57,13 +57,11 @@
|
|||
-- @function [parent=#CheckBox] loadTextureFrontCrossDisabled
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create(string, string, string, string, string, ccui.Widget::TextureResType)
|
||||
--
|
||||
-- overload function: create()
|
||||
--
|
||||
-- @overload self, string, string, string, string, string, int
|
||||
-- @overload self
|
||||
-- @function [parent=#CheckBox] create
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
|
@ -71,7 +69,7 @@
|
|||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @param #ccui.Widget::TextureResType texturerestype
|
||||
-- @param #int texturerestype
|
||||
-- @return CheckBox#CheckBox ret (retunr value: ccui.CheckBox)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Control] getState
|
||||
-- @param self
|
||||
-- @return Control::State#Control::State ret (return value: cc.Control::State)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Control] onTouchEnded
|
||||
|
@ -29,7 +29,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Control] sendActionsForControlEvents
|
||||
-- @param self
|
||||
-- @param #cc.Control::EventType eventtype
|
||||
-- @param #int eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Control] setSelected
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
-- @function [parent=#ControlButton] setTitleLabelForState
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setAdjustBackgroundImage
|
||||
|
@ -39,7 +39,7 @@
|
|||
-- @function [parent=#ControlButton] setTitleForState
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setLabelAnchorPoint
|
||||
|
@ -54,20 +54,20 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleTTFSizeForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setTitleTTFForState
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setTitleTTFSizeForState
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setTitleLabel
|
||||
|
@ -92,7 +92,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getBackgroundSpriteForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite)
|
||||
|
||||
--------------------------------
|
||||
|
@ -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)
|
||||
|
@ -121,7 +119,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleTTFForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
|
@ -132,14 +130,14 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleColorForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setTitleColorForState
|
||||
-- @param self
|
||||
-- @param #color3b_table color3b
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] doesAdjustBackgroundImage
|
||||
|
@ -150,13 +148,13 @@
|
|||
-- @function [parent=#ControlButton] setBackgroundSpriteFrameForState
|
||||
-- @param self
|
||||
-- @param #cc.SpriteFrame spriteframe
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setBackgroundSpriteForState
|
||||
-- @param self
|
||||
-- @param #cc.Scale9Sprite scale9sprite
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setScaleRatio
|
||||
|
@ -186,7 +184,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleLabelForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @return Node#Node ret (return value: cc.Node)
|
||||
|
||||
--------------------------------
|
||||
|
@ -199,12 +197,12 @@
|
|||
-- @function [parent=#ControlButton] setTitleBMFontForState
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleBMFontForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
|
@ -215,18 +213,14 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @param #int state
|
||||
-- @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
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
-- @function [parent=#ControlColourPicker] hueSliderValueChanged
|
||||
-- @param self
|
||||
-- @param #cc.Ref ref
|
||||
-- @param #cc.Control::EventType eventtype
|
||||
-- @param #int eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlColourPicker] getcolourPicker
|
||||
|
@ -49,7 +49,7 @@
|
|||
-- @function [parent=#ControlColourPicker] colourSliderValueChanged
|
||||
-- @param self
|
||||
-- @param #cc.Ref ref
|
||||
-- @param #cc.Control::EventType eventtype
|
||||
-- @param #int eventtype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlColourPicker] setHuePicker
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] pushMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #int matrix_stack_type
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] setGLDefaultValues
|
||||
|
@ -63,7 +63,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] loadMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #int matrix_stack_type
|
||||
-- @param #mat4_table mat4
|
||||
|
||||
--------------------------------
|
||||
|
@ -217,7 +217,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] getMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #int matrix_stack_type
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
|
@ -232,12 +232,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] setProjection
|
||||
-- @param self
|
||||
-- @param #cc.Director::Projection projection
|
||||
-- @param #int projection
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] loadIdentityMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #int matrix_stack_type
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] setNextDeltaTimeZero
|
||||
|
@ -251,7 +251,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] popMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #int matrix_stack_type
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] getVisibleSize
|
||||
|
@ -296,7 +296,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] multiplyMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #int matrix_stack_type
|
||||
-- @param #mat4_table mat4
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#DisplayManager] getDisplayRenderNodeType
|
||||
-- @param self
|
||||
-- @return DisplayType#DisplayType ret (return value: ccs.DisplayType)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DisplayManager] removeDisplay
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EditBox] setInputMode
|
||||
-- @param self
|
||||
-- @param #cc.EditBox::InputMode inputmode
|
||||
-- @param #int inputmode
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] setPlaceholderFontColor
|
||||
|
@ -70,12 +70,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EditBox] setReturnType
|
||||
-- @param self
|
||||
-- @param #cc.EditBox::KeyboardReturnType keyboardreturntype
|
||||
-- @param #int keyboardreturntype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] setInputFlag
|
||||
-- @param self
|
||||
-- @param #cc.EditBox::InputFlag inputflag
|
||||
-- @param #int inputflag
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] getMaxLength
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Event] getType
|
||||
-- @param self
|
||||
-- @return Event::Type#Event::Type ret (return value: cc.Event::Type)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Event] getCurrentTarget
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EventController] getControllerEventType
|
||||
-- @param self
|
||||
-- @return EventController::ControllerEventType#EventController::ControllerEventType ret (return value: cc.EventController::ControllerEventType)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventController] setConnectStatus
|
||||
|
@ -35,13 +35,11 @@
|
|||
-- @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, int, cc.Controller, bool
|
||||
-- @overload self, int, cc.Controller, int
|
||||
-- @function [parent=#EventController] EventController
|
||||
-- @param self
|
||||
-- @param #cc.EventController::ControllerEventType controllereventtype
|
||||
-- @param #int controllereventtype
|
||||
-- @param #cc.Controller controller
|
||||
-- @param #int int
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EventDispatcher] removeEventListenersForType
|
||||
-- @param self
|
||||
-- @param #cc.EventListener::Type type
|
||||
-- @param #int type
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventDispatcher] EventDispatcher
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EventKeyboard] EventKeyboard
|
||||
-- @param self
|
||||
-- @param #cc.EventKeyboard::KeyCode keycode
|
||||
-- @param #int keycode
|
||||
-- @param #bool bool
|
||||
|
||||
return nil
|
||||
|
|
|
@ -49,6 +49,6 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EventMouse] EventMouse
|
||||
-- @param self
|
||||
-- @param #cc.EventMouse::MouseEventType mouseeventtype
|
||||
-- @param #int mouseeventtype
|
||||
|
||||
return nil
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EventTouch] getEventCode
|
||||
-- @param self
|
||||
-- @return EventTouch::EventCode#EventTouch::EventCode ret (return value: cc.EventTouch::EventCode)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventTouch] setEventCode
|
||||
-- @param self
|
||||
-- @param #cc.EventTouch::EventCode eventcode
|
||||
-- @param #int eventcode
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventTouch] EventTouch
|
||||
|
|
|
@ -1,146 +0,0 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module FastTMXLayer
|
||||
-- @extend Node
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getPositionAt
|
||||
-- @param self
|
||||
-- @param #vec2_table vec2
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setLayerOrientation
|
||||
-- @param self
|
||||
-- @param #int int
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getLayerSize
|
||||
-- @param self
|
||||
-- @return size_table#size_table ret (return value: size_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setMapTileSize
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getLayerOrientation
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setProperties
|
||||
-- @param self
|
||||
-- @param #map_table map
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setLayerName
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] removeTileAt
|
||||
-- @param self
|
||||
-- @param #vec2_table vec2
|
||||
|
||||
--------------------------------
|
||||
-- overload function: getProperties()
|
||||
--
|
||||
-- overload function: getProperties()
|
||||
--
|
||||
-- @function [parent=#FastTMXLayer] getProperties
|
||||
-- @param self
|
||||
-- @return map_table#map_table ret (retunr value: map_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setupTiles
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setupTileSprite
|
||||
-- @param self
|
||||
-- @param #cc.Sprite sprite
|
||||
-- @param #vec2_table vec2
|
||||
-- @param #int int
|
||||
|
||||
--------------------------------
|
||||
-- overload function: setTileGID(int, vec2_table, cc.TMXTileFlags_)
|
||||
--
|
||||
-- overload function: setTileGID(int, vec2_table)
|
||||
--
|
||||
-- @function [parent=#FastTMXLayer] setTileGID
|
||||
-- @param self
|
||||
-- @param #int int
|
||||
-- @param #vec2_table vec2
|
||||
-- @param #cc.TMXTileFlags_ tmxtileflags_
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getMapTileSize
|
||||
-- @param self
|
||||
-- @return size_table#size_table ret (return value: size_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getProperty
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @return Value#Value ret (return value: cc.Value)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setLayerSize
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getLayerName
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] setTileSet
|
||||
-- @param self
|
||||
-- @param #cc.TMXTilesetInfo tmxtilesetinfo
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getTileSet
|
||||
-- @param self
|
||||
-- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getTileAt
|
||||
-- @param self
|
||||
-- @param #vec2_table vec2
|
||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] create
|
||||
-- @param self
|
||||
-- @param #cc.TMXTilesetInfo tmxtilesetinfo
|
||||
-- @param #cc.TMXLayerInfo tmxlayerinfo
|
||||
-- @param #cc.TMXMapInfo map
|
||||
-- @return FastTMXLayer#FastTMXLayer ret (return value: cc.FastTMXLayer)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] removeChild
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #mat4_table mat4
|
||||
-- @param #unsigned int int
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] getDescription
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXLayer] FastTMXLayer
|
||||
-- @param self
|
||||
|
||||
return nil
|
|
@ -1,103 +0,0 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module FastTMXTiledMap
|
||||
-- @extend Node
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] setObjectGroups
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getProperty
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @return Value#Value ret (return value: cc.Value)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] setMapSize
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getObjectGroup
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @return TMXObjectGroup#TMXObjectGroup ret (return value: cc.TMXObjectGroup)
|
||||
|
||||
--------------------------------
|
||||
-- overload function: getObjectGroups()
|
||||
--
|
||||
-- overload function: getObjectGroups()
|
||||
--
|
||||
-- @function [parent=#FastTMXTiledMap] getObjectGroups
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (retunr value: array_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getTileSize
|
||||
-- @param self
|
||||
-- @return size_table#size_table ret (return value: size_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getMapSize
|
||||
-- @param self
|
||||
-- @return size_table#size_table ret (return value: size_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getProperties
|
||||
-- @param self
|
||||
-- @return map_table#map_table ret (return value: map_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getPropertiesForGID
|
||||
-- @param self
|
||||
-- @param #int int
|
||||
-- @return Value#Value ret (return value: cc.Value)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] setTileSize
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] setProperties
|
||||
-- @param self
|
||||
-- @param #map_table map
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getLayer
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @return FastTMXLayer#FastTMXLayer ret (return value: cc.FastTMXLayer)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getMapOrientation
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] setMapOrientation
|
||||
-- @param self
|
||||
-- @param #int int
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] create
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @return FastTMXTiledMap#FastTMXTiledMap ret (return value: cc.FastTMXTiledMap)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] createWithXML
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #string str
|
||||
-- @return FastTMXTiledMap#FastTMXTiledMap ret (return value: cc.FastTMXTiledMap)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FastTMXTiledMap] getDescription
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
return nil
|
|
@ -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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue