mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of github.com:cocos2d/cocos2d-x into v3
This commit is contained in:
commit
30819193a4
|
@ -4,6 +4,7 @@ cocos2d-x-3.5 Mar.23 2015
|
|||
[FIX] AutoRelasePool: memory leak if adding an element into pool when releasing auto release pool
|
||||
[FIX] FileUtils: getWritablePath() does not return correct writable path on Mac & Windows
|
||||
[FIX] HttpAsynConnection: can not get error content if response code less than 200 or response code greater or equal than 300
|
||||
[FIX] HttpResponse: reference count error causes assert error
|
||||
|
||||
cocos2d-x-3.5rc0 Mar.13 2015
|
||||
[NEW] CocosStudio: add callback when loading a CSB file
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,8 @@ THE SOFTWARE.
|
|||
#ifndef __CC_FRAMEWORK_COMPONENT_H__
|
||||
#define __CC_FRAMEWORK_COMPONENT_H__
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
#include <string>
|
||||
|
@ -80,4 +82,5 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __FUNDATION__CCCOMPONENT_H__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,8 @@ THE SOFTWARE.
|
|||
#ifndef __CC_FRAMEWORK_COMCONTAINER_H__
|
||||
#define __CC_FRAMEWORK_COMCONTAINER_H__
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCMap.h"
|
||||
#include <string>
|
||||
|
||||
|
@ -68,4 +70,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __FUNDATION__CCCOMPONENT_H__
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#ifndef _CCFont_h_
|
||||
#define _CCFont_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string>
|
||||
#include "2d/CCLabel.h"
|
||||
|
||||
|
@ -33,8 +35,6 @@ NS_CC_BEGIN
|
|||
|
||||
class FontAtlas;
|
||||
|
||||
/// @cond
|
||||
|
||||
class CC_DLL Font : public Ref
|
||||
{
|
||||
public:
|
||||
|
@ -65,8 +65,7 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif
|
||||
|
|
|
@ -22,9 +22,12 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _CCFontAtlas_h_
|
||||
#define _CCFontAtlas_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
|
@ -34,14 +37,11 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
//fwd
|
||||
class Font;
|
||||
class Texture2D;
|
||||
class EventCustom;
|
||||
class EventListenerCustom;
|
||||
|
||||
/// @cond
|
||||
|
||||
struct FontLetterDefinition
|
||||
{
|
||||
unsigned short letteCharUTF16;
|
||||
|
@ -130,9 +130,7 @@ protected:
|
|||
bool _antialiasEnabled;
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
NS_CC_END
|
||||
|
||||
|
||||
/// @endcond
|
||||
#endif /* defined(__cocos2d_libs__CCFontAtlas__) */
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#ifndef _CCFontAtlasCache_h_
|
||||
#define _CCFontAtlasCache_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "2d/CCLabel.h"
|
||||
|
@ -34,8 +36,6 @@ NS_CC_BEGIN
|
|||
|
||||
class FontAtlas;
|
||||
|
||||
/// @cond
|
||||
|
||||
class CC_DLL FontAtlasCache
|
||||
{
|
||||
public:
|
||||
|
@ -58,8 +58,7 @@ private:
|
|||
static std::unordered_map<std::string, FontAtlas *> _atlasMap;
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#ifndef _CCFontCharMap_h_
|
||||
#define _CCFontCharMap_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "2d/CCFont.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/// @cond
|
||||
|
||||
class FontCharMap : public Font
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
#ifndef _CCFontFNT_h_
|
||||
#define _CCFontFNT_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "CCFont.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class BMFontConfiguration;
|
||||
|
||||
/// @cond FontFNT
|
||||
|
||||
class CC_DLL FontFNT : public Font
|
||||
{
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#ifndef _FontFreetype_h_
|
||||
#define _FontFreetype_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "CCFont.h"
|
||||
|
||||
#include <string>
|
||||
|
@ -46,8 +48,6 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/// @cond
|
||||
|
||||
class CC_DLL FontFreeType : public Font
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -40,18 +40,21 @@ public:
|
|||
*/
|
||||
virtual ~GLBufferedNode();
|
||||
|
||||
/**
|
||||
/**@{
|
||||
* Load the given data into this Node's GL Buffer. Needed for WebGL, as it does not support client-side arrays.
|
||||
*/
|
||||
void setGLBufferData(void *buf, GLuint bufSize, int slot);
|
||||
void setGLIndexData(void *buf, GLuint bufSize, int slot);
|
||||
|
||||
// We allocate 4 buffer objs per node, and index into them as slots.
|
||||
/**@}*/
|
||||
/** Allocate 4 buffer objs per node, and index into them as slots.*/
|
||||
#define BUFFER_SLOTS 4
|
||||
/**Handle for vertex buffers.*/
|
||||
GLuint _bufferObject[BUFFER_SLOTS];
|
||||
/**Size in bytes for vertex buffers.*/
|
||||
GLuint _bufferSize[BUFFER_SLOTS];
|
||||
|
||||
/**Handle for index buffers.*/
|
||||
GLuint _indexBufferObject[BUFFER_SLOTS];
|
||||
/**Size in bytes for index buffers.*/
|
||||
GLuint _indexBufferSize[BUFFER_SLOTS];
|
||||
};
|
||||
#endif // __CC_GL_BUFFERED_NODE__
|
||||
|
|
|
@ -43,17 +43,21 @@ class Grabber : public Ref
|
|||
{
|
||||
public:
|
||||
/**
|
||||
Constructor.
|
||||
* @js ctor
|
||||
*/
|
||||
Grabber(void);
|
||||
/**
|
||||
Destructor.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Grabber(void);
|
||||
|
||||
/**Init the grab structure, will set the texture as the FBO color attachment.*/
|
||||
void grab(Texture2D *texture);
|
||||
/**Begin capture the screen, which will save the old FBO, clear color, and set the new FBO, clear the background.*/
|
||||
void beforeRender(Texture2D *texture);
|
||||
/**After capture, will reset the old FBO and clear color.*/
|
||||
void afterRender(Texture2D *texture);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -42,7 +42,7 @@ class Node;
|
|||
* @{
|
||||
*/
|
||||
|
||||
/** Base class for other
|
||||
/** Base class for Other grid.
|
||||
*/
|
||||
class CC_DLL GridBase : public Ref
|
||||
{
|
||||
|
@ -52,42 +52,70 @@ public:
|
|||
/** create one Grid */
|
||||
static GridBase* create(const Size& gridSize);
|
||||
/**
|
||||
Destructor.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~GridBase(void);
|
||||
|
||||
/**@{
|
||||
Init the Grid base.
|
||||
@param gridSize the size of the grid.
|
||||
@param texture The texture used for grab.
|
||||
@param flipped whether or not the grab texture should be flip by Y or not.
|
||||
*/
|
||||
bool initWithSize(const Size& gridSize, Texture2D *texture, bool flipped);
|
||||
bool initWithSize(const Size& gridSize);
|
||||
|
||||
/** whether or not the grid is active */
|
||||
/**@}*/
|
||||
/** @{
|
||||
Getter and setter of the active state of the grid.
|
||||
*/
|
||||
inline bool isActive(void) const { return _active; }
|
||||
void setActive(bool active);
|
||||
/**@}*/
|
||||
|
||||
/** number of times that the grid will be reused */
|
||||
/** Get number of times that the grid will be reused. */
|
||||
inline int getReuseGrid(void) const { return _reuseGrid; }
|
||||
/** Set number of times that the grid will be reused. */
|
||||
inline void setReuseGrid(int reuseGrid) { _reuseGrid = reuseGrid; }
|
||||
|
||||
/** size of the grid */
|
||||
/** Size of the grid. */
|
||||
inline const Size& getGridSize(void) const { return _gridSize; }
|
||||
/**Set the size of the grid.*/
|
||||
inline void setGridSize(const Size& gridSize) { _gridSize = gridSize; }
|
||||
|
||||
/** pixels between the grids */
|
||||
/** Pixels between the grids. */
|
||||
inline const Vec2& getStep(void) const { return _step; }
|
||||
/**Get the pixels between the grids.*/
|
||||
inline void setStep(const Vec2& step) { _step = step; }
|
||||
|
||||
/** is texture flipped */
|
||||
/** is texture flipped. */
|
||||
inline bool isTextureFlipped(void) const { return _isTextureFlipped; }
|
||||
/**Set the texture flipped or not.*/
|
||||
void setTextureFlipped(bool flipped);
|
||||
|
||||
/**@{
|
||||
Init and reset the status when render effects by using the grid.
|
||||
*/
|
||||
void beforeDraw(void);
|
||||
void afterDraw(Node *target);
|
||||
/**@}*/
|
||||
|
||||
/**@{
|
||||
Interface for custom action when before or after draw.
|
||||
*/
|
||||
virtual void beforeBlit() {}
|
||||
virtual void afterBlit() {}
|
||||
/**@}*/
|
||||
|
||||
/**Interface used to blit the texture with grid to screen.*/
|
||||
virtual void blit(void);
|
||||
/**Interface, Reuse the grid vertices.*/
|
||||
virtual void reuse(void);
|
||||
/**Interface, Calculate the vertices used for the blit.*/
|
||||
virtual void calculateVertexPoints(void);
|
||||
|
||||
/**Change projection to 2D for grabbing.*/
|
||||
void set2DProjection(void);
|
||||
|
||||
protected:
|
||||
|
@ -108,21 +136,23 @@ protected:
|
|||
class CC_DLL Grid3D : public GridBase
|
||||
{
|
||||
public:
|
||||
/** create one Grid */
|
||||
/** create one Grid. */
|
||||
static Grid3D* create(const Size& gridSize, Texture2D *texture, bool flipped);
|
||||
/** create one Grid */
|
||||
/** create one Grid. */
|
||||
static Grid3D* create(const Size& gridSize);
|
||||
/**
|
||||
Constructor.
|
||||
* @js ctor
|
||||
*/
|
||||
Grid3D();
|
||||
/**
|
||||
Destructor.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Grid3D(void);
|
||||
|
||||
/** returns the vertex at a given position
|
||||
/** Returns the vertex at a given position.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
|
@ -132,7 +162,7 @@ public:
|
|||
* @lua NA
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE Vec3 vertex(const Vec2& pos) const { return getVertex(pos); }
|
||||
/** returns the original (non-transformed) vertex at a given position
|
||||
/** Returns the original (non-transformed) vertex at a given position.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
|
@ -143,21 +173,27 @@ public:
|
|||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE Vec3 originalVertex(const Vec2& pos) const { return getOriginalVertex(pos); }
|
||||
|
||||
/** sets a new vertex at a given position
|
||||
/** Sets a new vertex at a given position.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
void setVertex(const Vec2& pos, const Vec3& vertex);
|
||||
|
||||
/**@{
|
||||
Implementations for interfaces in base calss.
|
||||
*/
|
||||
virtual void beforeBlit() override;
|
||||
virtual void afterBlit() override;
|
||||
// Overrides
|
||||
virtual void blit() override;
|
||||
virtual void reuse() override;
|
||||
virtual void calculateVertexPoints() override;
|
||||
/**@}*/
|
||||
|
||||
/**@{
|
||||
Getter and Setter for depth test state when blit.
|
||||
*/
|
||||
void setNeedDepthTestForBlit( bool neededDepthTest) { _needDepthTestForBlit = neededDepthTest; }
|
||||
bool getNeedDepthTestForBlit() const { return _needDepthTestForBlit; }
|
||||
/**@}*/
|
||||
protected:
|
||||
GLvoid *_texCoordinates;
|
||||
GLvoid *_vertices;
|
||||
|
@ -175,21 +211,23 @@ protected:
|
|||
class CC_DLL TiledGrid3D : public GridBase
|
||||
{
|
||||
public:
|
||||
/** create one Grid */
|
||||
/** Create one Grid. */
|
||||
static TiledGrid3D* create(const Size& gridSize, Texture2D *texture, bool flipped);
|
||||
/** create one Grid */
|
||||
/** Create one Grid. */
|
||||
static TiledGrid3D* create(const Size& gridSize);
|
||||
/**
|
||||
Constructor.
|
||||
* @js ctor
|
||||
*/
|
||||
TiledGrid3D();
|
||||
/**
|
||||
Destructor.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~TiledGrid3D();
|
||||
|
||||
/** returns the tile at the given position
|
||||
/** Returns the tile at the given position.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
|
@ -199,7 +237,7 @@ public:
|
|||
* @lua NA
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE Quad3 tile(const Vec2& pos) const { return getTile(pos); }
|
||||
/** returns the original tile (untransformed) at the given position
|
||||
/** Returns the original tile (untransformed) at the given position.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
|
@ -210,17 +248,19 @@ public:
|
|||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE Quad3 originalTile(const Vec2& pos) const { return getOriginalTile(pos); }
|
||||
|
||||
/** sets a new tile
|
||||
/** Sets a new tile.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
void setTile(const Vec2& pos, const Quad3& coords);
|
||||
|
||||
// Overrides
|
||||
/**@{
|
||||
Implementations for interfaces in base calss.
|
||||
*/
|
||||
virtual void blit() override;
|
||||
virtual void reuse() override;
|
||||
virtual void calculateVertexPoints() override;
|
||||
|
||||
/**@}*/
|
||||
protected:
|
||||
GLvoid *_texCoordinates;
|
||||
GLvoid *_vertices;
|
||||
|
|
|
@ -40,6 +40,8 @@ NS_CC_BEGIN
|
|||
/**
|
||||
* @brief Possible GlyphCollection used by Label.
|
||||
*
|
||||
* Specify a collections of characters to be load when Label created.
|
||||
* Consider using DYNAMIC.
|
||||
*/
|
||||
enum class GlyphCollection {
|
||||
DYNAMIC,
|
||||
|
@ -61,14 +63,16 @@ enum class LabelEffect {
|
|||
|
||||
/**
|
||||
* @struct TTFConfig
|
||||
*
|
||||
* @see `GlyphCollection`
|
||||
*/
|
||||
typedef struct _ttfConfig
|
||||
{
|
||||
std::string fontFilePath;
|
||||
int fontSize;
|
||||
|
||||
GlyphCollection glyphs;
|
||||
const char *customGlyphs;
|
||||
|
||||
bool distanceFieldEnabled;
|
||||
int outlineSize;
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ Use any of these editors to generate BMFonts:
|
|||
#ifndef __CCBITMAP_FONT_ATLAS_H__
|
||||
#define __CCBITMAP_FONT_ATLAS_H__
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "2d/CCLabel.h"
|
||||
#if CC_LABELBMFONT_DEBUG_DRAW
|
||||
#include "renderer/CCCustomCommand.h"
|
||||
|
@ -42,8 +44,6 @@ Use any of these editors to generate BMFonts:
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/// @cond
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#elif _MSC_VER >= 1400 //vs 2005 or higher
|
||||
|
@ -157,8 +157,7 @@ private:
|
|||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif //__CCBITMAP_FONT_ATLAS_H__
|
||||
|
|
|
@ -23,9 +23,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCLABELTTF_H__
|
||||
#define __CCLABELTTF_H__
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "2d/CCNode.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -171,9 +174,8 @@ protected:
|
|||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif //__CCLABEL_H__
|
||||
|
||||
|
|
|
@ -26,13 +26,14 @@
|
|||
#ifndef _CCLabelTextFormatter_h_
|
||||
#define _CCLabelTextFormatter_h_
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Label;
|
||||
|
||||
/// @cond
|
||||
class CC_DLL LabelTextFormatter
|
||||
{
|
||||
public:
|
||||
|
@ -43,8 +44,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Copyright (c) 2009-2010 Ricardo Quesada
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -29,6 +29,8 @@ THE SOFTWARE.
|
|||
#ifndef __CC_TM_XML_PARSER__
|
||||
#define __CC_TM_XML_PARSER__
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "math/CCGeometry.h"
|
||||
#include "platform/CCSAXParser.h"
|
||||
#include "base/CCVector.h"
|
||||
|
@ -323,5 +325,5 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,8 @@ THE SOFTWARE.
|
|||
#ifndef __CCTWEENFUNCTION_H__
|
||||
#define __CCTWEENFUNCTION_H__
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -293,4 +295,5 @@ namespace tweenfunc {
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /*__CCTWEENFUNCTION_H__*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2014-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
|
||||
/**
|
||||
* @addtogroup global
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
/** @class Configuration
|
||||
|
@ -234,7 +234,7 @@ protected:
|
|||
ValueMap _valueDict;
|
||||
};
|
||||
|
||||
// end of global group
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __CCCONSOLE_H__
|
||||
#define __CCCONSOLE_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <BaseTsd.h>
|
||||
|
@ -158,4 +158,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* defined(__CCCONSOLE_H__) */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifndef __CCDATAVISITOR_H__
|
||||
#define __CCDATAVISITOR_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
#include <string>
|
||||
|
@ -40,10 +41,6 @@ class __Array;
|
|||
class __Dictionary;
|
||||
class __Set;
|
||||
|
||||
/**
|
||||
* @cond
|
||||
*/
|
||||
|
||||
/**
|
||||
* Visitor that helps to perform action that depends on polymorphic object type
|
||||
*
|
||||
|
@ -111,4 +108,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CCDATAVISITOR_H__
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
#include "base/CCRef.h"
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Node;
|
||||
|
@ -96,5 +101,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif // __CCEVENT_H__
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
#include "base/CCEvent.h"
|
||||
#include "base/ccTypes.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/** @class EventAcceleration
|
||||
|
@ -47,6 +52,9 @@ private:
|
|||
friend class EventListenerAcceleration;
|
||||
};
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCAccelerometerEvent__) */
|
||||
|
|
|
@ -29,15 +29,24 @@
|
|||
#include "platform/CCPlatformMacros.h"
|
||||
#include "base/CCEvent.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/// @cond EventController
|
||||
class Controller;
|
||||
class EventListenerController;
|
||||
|
||||
/** @class EventController
|
||||
* @brief Controller event.
|
||||
*/
|
||||
class EventController : public Event
|
||||
{
|
||||
public:
|
||||
/** ControllerEventType Controller event type.*/
|
||||
enum class ControllerEventType
|
||||
{
|
||||
CONNECTION,
|
||||
|
@ -45,16 +54,46 @@ public:
|
|||
AXIS_STATUS_CHANGED,
|
||||
};
|
||||
|
||||
/** Create a EventController with controller event type, contrlloer and key code.
|
||||
*
|
||||
* @param type A given controller event type.
|
||||
* @param controller A given controller pointer.
|
||||
* @param keyCode A given key code.
|
||||
* @return An autoreleased EventController object.
|
||||
*/
|
||||
EventController(ControllerEventType type, Controller* controller, int keyCode);
|
||||
/** Create a EventController with controller event type, contrlloer and whether or not is connected.
|
||||
*
|
||||
* @param type A given controller event type.
|
||||
* @param controller A given controller pointer.
|
||||
* @param isConnected True if it is connected.
|
||||
* @return An autoreleased EventController object.
|
||||
*/
|
||||
EventController(ControllerEventType type, Controller* controller, bool isConnected);
|
||||
|
||||
/** Gets the event type of the controller.
|
||||
*
|
||||
* @return The event type of the controller.
|
||||
*/
|
||||
ControllerEventType getControllerEventType() const { return _controllerEventType; }
|
||||
Controller* getController() const { return _controller; }
|
||||
|
||||
/** Gets the key code of the controller.
|
||||
*
|
||||
* @return The key code of the controller.
|
||||
*/
|
||||
int getKeyCode() const{ return _keyCode; }
|
||||
void setKeyCode(int keyCode) { _keyCode = keyCode;}
|
||||
|
||||
/** Sets the connect status.
|
||||
*
|
||||
* @param True if it's connected.
|
||||
*/
|
||||
void setConnectStatus(bool isConnected) {_isConnected = isConnected;}
|
||||
/** Gets the connect status.
|
||||
*
|
||||
* @return True if it's connected.
|
||||
*/
|
||||
bool isConnected() const { return _isConnected; }
|
||||
|
||||
protected:
|
||||
|
@ -68,4 +107,7 @@ protected:
|
|||
/// @endcond EventController
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__EventController__) */
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
#include <string>
|
||||
#include "base/CCEvent.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/** @class EventCustom
|
||||
|
@ -39,6 +44,7 @@ public:
|
|||
/** Constructor.
|
||||
*
|
||||
* @param eventName A given name of the custom event.
|
||||
* @js ctor
|
||||
*/
|
||||
EventCustom(const std::string& eventName);
|
||||
|
||||
|
@ -66,4 +72,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCCustomEvent__) */
|
||||
|
|
|
@ -36,6 +36,11 @@
|
|||
#include "base/CCEvent.h"
|
||||
#include "platform/CCStdC.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
|
@ -52,6 +57,7 @@ The EventListener list is managed in such a way that
|
|||
event listeners can be added and removed even
|
||||
from within an EventListener, while events are being
|
||||
dispatched.
|
||||
@js NA
|
||||
*/
|
||||
class CC_DLL EventDispatcher : public Ref
|
||||
{
|
||||
|
@ -320,5 +326,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif // __CC_EVENT_DISPATCHER_H__
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
|
||||
#include "base/CCEvent.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -45,6 +49,7 @@ public:
|
|||
*
|
||||
* @param widgetLoseFocus The widget which lose focus.
|
||||
* @param widgetGetFocus The widget which get focus.
|
||||
* @js ctor
|
||||
*/
|
||||
EventFocus(ui::Widget* widgetLoseFocus, ui::Widget* widgetGetFocus);
|
||||
|
||||
|
@ -58,4 +63,7 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCEventFocus__) */
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
|
||||
#include "base/CCEvent.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/** @class EventKeyboard
|
||||
|
@ -38,6 +43,7 @@ class CC_DLL EventKeyboard : public Event
|
|||
public:
|
||||
/**
|
||||
* KeyCode The key (code).
|
||||
* @js NA
|
||||
*/
|
||||
enum class KeyCode
|
||||
{
|
||||
|
@ -217,6 +223,7 @@ public:
|
|||
*
|
||||
* @param keyCode A given keycode.
|
||||
* @param isPressed True if the key is pressed.
|
||||
* @js ctor
|
||||
*/
|
||||
EventKeyboard(KeyCode keyCode, bool isPressed);
|
||||
|
||||
|
@ -229,4 +236,7 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCKeyboardEvent__) */
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
#include "platform/CCPlatformMacros.h"
|
||||
#include "base/CCRef.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
|
@ -62,13 +67,20 @@ public:
|
|||
typedef std::string ListenerID;
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
/** Constructor */
|
||||
/**
|
||||
* Constructor
|
||||
* @js ctor
|
||||
*/
|
||||
EventListener();
|
||||
|
||||
/** Initializes event with type and callback function */
|
||||
/**
|
||||
* Initializes event with type and callback function
|
||||
* @js NA
|
||||
*/
|
||||
bool init(Type t, const ListenerID& listenerID, const std::function<void(Event*)>& callback);
|
||||
public:
|
||||
/** Destructor.
|
||||
* @js NA
|
||||
*/
|
||||
virtual ~EventListener();
|
||||
|
||||
|
@ -166,4 +178,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif // __CCEVENTLISTENER_H__
|
||||
|
|
|
@ -28,10 +28,16 @@
|
|||
#include "base/CCEventListener.h"
|
||||
#include "base/ccTypes.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/** @class EventListenerAcceleration
|
||||
* @brief Acceleration event listener.
|
||||
* @js NA
|
||||
*/
|
||||
class CC_DLL EventListenerAcceleration : public EventListener
|
||||
{
|
||||
|
@ -66,4 +72,7 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCAccelerometerListener__) */
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
#include "platform/CCPlatformMacros.h"
|
||||
#include "base/CCEventListener.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
|
@ -36,6 +41,7 @@ class Controller;
|
|||
|
||||
/** @class EventListenerController
|
||||
* @param Controller event listener.
|
||||
* @js NA
|
||||
*/
|
||||
class EventListenerController : public EventListener
|
||||
{
|
||||
|
@ -67,4 +73,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__EventListenerController__) */
|
||||
|
|
|
@ -27,6 +27,11 @@
|
|||
|
||||
#include "base/CCEventListener.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class EventCustom;
|
||||
|
@ -49,6 +54,7 @@ class EventCustom;
|
|||
* Removes a listener
|
||||
*
|
||||
* dispatcher->removeEventListener(listener);
|
||||
* @js cc._EventListenerCustom
|
||||
*/
|
||||
class CC_DLL EventListenerCustom : public EventListener
|
||||
{
|
||||
|
@ -79,4 +85,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCCustomEventListener__) */
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
|
||||
#include "base/CCEventListener.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -50,6 +54,7 @@ public:
|
|||
static EventListenerFocus* create();
|
||||
|
||||
/** Destructor.
|
||||
* @js NA
|
||||
*/
|
||||
virtual ~EventListenerFocus();
|
||||
|
||||
|
@ -68,8 +73,9 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
friend class EventDispatcher;
|
||||
};
|
||||
|
||||
|
||||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCEventListenerFocus__) */
|
||||
|
|
|
@ -29,12 +29,18 @@
|
|||
#include "base/CCEventListener.h"
|
||||
#include "base/CCEventKeyboard.h"
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
|
||||
/** @class EventListenerKeyboard
|
||||
* @brief Keyboard event listener.
|
||||
* @js cc._EventListenerKeyboard
|
||||
*/
|
||||
class CC_DLL EventListenerKeyboard : public EventListener
|
||||
{
|
||||
|
@ -60,4 +66,7 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCKeyboardEventListener__) */
|
||||
|
|
|
@ -29,12 +29,18 @@
|
|||
#ifndef __cocos2d_libs__CCMouseEventListener__
|
||||
#define __cocos2d_libs__CCMouseEventListener__
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Event;
|
||||
|
||||
/** @class EventListenerMouse
|
||||
* @brief Mouse event listener.
|
||||
* @js cc._EventListenerMouse
|
||||
*/
|
||||
class CC_DLL EventListenerMouse : public EventListener
|
||||
{
|
||||
|
@ -63,4 +69,7 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCMouseEventListener__) */
|
||||
|
|
|
@ -27,15 +27,20 @@
|
|||
#define __cocos2d_libs__CCTouchEventListener__
|
||||
|
||||
#include "base/CCEventListener.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Touch;
|
||||
|
||||
/** @class EventListenerTouchOneByOne
|
||||
* @brief Single touch event listener.
|
||||
* @js cc._EventListenerTouchOneByOne
|
||||
*/
|
||||
class CC_DLL EventListenerTouchOneByOne : public EventListener
|
||||
{
|
||||
|
@ -46,7 +51,10 @@ public:
|
|||
*/
|
||||
static EventListenerTouchOneByOne* create();
|
||||
|
||||
/** Destructor. */
|
||||
/**
|
||||
* Destructor.
|
||||
* @js NA
|
||||
*/
|
||||
virtual ~EventListenerTouchOneByOne();
|
||||
|
||||
/** Whether or not to swall touches.
|
||||
|
@ -100,6 +108,7 @@ public:
|
|||
*/
|
||||
static EventListenerTouchAllAtOnce* create();
|
||||
/** Destructor.
|
||||
* @js NA
|
||||
*/
|
||||
virtual ~EventListenerTouchAllAtOnce();
|
||||
|
||||
|
@ -126,4 +135,7 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCTouchEventListener__) */
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
#define MOUSE_BUTTON_7 6
|
||||
#define MOUSE_BUTTON_8 7
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/** @class EventMouse
|
||||
|
@ -48,6 +53,7 @@ class CC_DLL EventMouse : public Event
|
|||
public:
|
||||
/**
|
||||
* MouseEventType Different types of MouseEvent.
|
||||
* @js NA
|
||||
*/
|
||||
enum class MouseEventType
|
||||
{
|
||||
|
@ -61,6 +67,7 @@ public:
|
|||
/** Constructor.
|
||||
*
|
||||
* @param mouseEventCode A given mouse event type.
|
||||
* @js ctor
|
||||
*/
|
||||
EventMouse(MouseEventType mouseEventCode);
|
||||
|
||||
|
@ -85,6 +92,7 @@ public:
|
|||
*
|
||||
* @param x The x coordinate of cursor position.
|
||||
* @param y The y coordinate of cursor position.
|
||||
* @js setLocation
|
||||
*/
|
||||
inline void setCursorPosition(float x, float y) {
|
||||
_x = x;
|
||||
|
@ -102,21 +110,25 @@ public:
|
|||
/** Set mouse button.
|
||||
*
|
||||
* @param button a given mouse button.
|
||||
* @js setButton
|
||||
*/
|
||||
inline void setMouseButton(int button) { _mouseButton = button; };
|
||||
/** Get mouse button.
|
||||
*
|
||||
* @return The mouse button.
|
||||
* @js getButton
|
||||
*/
|
||||
inline int getMouseButton() { return _mouseButton; };
|
||||
/** Get the cursor position of x axis.
|
||||
*
|
||||
* @return The x coordinate of cursor position.
|
||||
* @js getLocationX
|
||||
*/
|
||||
inline float getCursorX() { return _x; };
|
||||
/** Get the cursor position of y axis.
|
||||
*
|
||||
* @return The y coordinate of cursor position.
|
||||
* @js getLocationY
|
||||
*/
|
||||
inline float getCursorY() { return _y; };
|
||||
|
||||
|
@ -128,11 +140,13 @@ public:
|
|||
/** Returns the previous touch location in OpenGL coordinates.
|
||||
*
|
||||
* @return The previous touch location in OpenGL coordinates.
|
||||
* @js NA
|
||||
*/
|
||||
Vec2 getPreviousLocation() const;
|
||||
/** Returns the start touch location in OpenGL coordinates.
|
||||
*
|
||||
* @return The start touch location in OpenGL coordinates.
|
||||
* @js NA
|
||||
*/
|
||||
Vec2 getStartLocation() const;
|
||||
/** Returns the delta of 2 current touches locations in screen coordinates.
|
||||
|
@ -148,11 +162,13 @@ public:
|
|||
/** Returns the previous touch location in screen coordinates.
|
||||
*
|
||||
* @return The previous touch location in screen coordinates.
|
||||
* @js NA
|
||||
*/
|
||||
Vec2 getPreviousLocationInView() const;
|
||||
/** Returns the start touch location in screen coordinates.
|
||||
*
|
||||
* @return The start touch location in screen coordinates.
|
||||
* @js NA
|
||||
*/
|
||||
Vec2 getStartLocationInView() const;
|
||||
|
||||
|
@ -175,4 +191,7 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCMouseEvent__) */
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
#include "base/CCEvent.h"
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
* @{
|
||||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Touch;
|
||||
|
@ -51,7 +56,10 @@ public:
|
|||
CANCELLED
|
||||
};
|
||||
|
||||
/** Constructor.*/
|
||||
/**
|
||||
* Constructor.
|
||||
* @js NA
|
||||
*/
|
||||
EventTouch();
|
||||
|
||||
/** Get event code.
|
||||
|
@ -89,4 +97,7 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
// end of base group
|
||||
/// @}
|
||||
|
||||
#endif /* defined(__cocos2d_libs__TouchEvent__) */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifndef __CCEVENT_TYPE_H__
|
||||
#define __CCEVENT_TYPE_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
/**
|
||||
* This header is used for defining event types using in NotificationCenter
|
||||
|
@ -43,4 +44,5 @@
|
|||
// This message is posted in cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp and cocos\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp.
|
||||
#define EVENT_COME_TO_BACKGROUND "event_come_to_background"
|
||||
|
||||
/// @endcond
|
||||
#endif // __CCEVENT_TYPE_H__
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2014-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,9 +24,11 @@
|
|||
|
||||
#ifndef __cocos2d_libs__CCGameController__
|
||||
#define __cocos2d_libs__CCGameController__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCController.h"
|
||||
#include "base/CCEventController.h"
|
||||
#include "base/CCEventListenerController.h"
|
||||
|
||||
/// @endcond
|
||||
#endif /* defined(__cocos2d_libs__CCGameController__) */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 Stuart Carnie
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -23,8 +23,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __SUPPORT_CCPROFILING_H__
|
||||
#define __SUPPORT_CCPROFILING_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
|
@ -161,4 +163,5 @@ extern bool kProfilerCategoryParticles;
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __SUPPORT_CCPROFILING_H__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -26,6 +26,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __BASE_CCPROTOCOLS_H__
|
||||
#define __BASE_CCPROTOCOLS_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -268,4 +269,5 @@ public:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __BASE_CCPROTOCOLS_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 PlayFirst Inc.
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2014-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
|||
|
||||
#ifndef __CC_REF_PTR_H__
|
||||
#define __CC_REF_PTR_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/ccMacros.h"
|
||||
|
@ -33,8 +34,6 @@
|
|||
NS_CC_BEGIN
|
||||
|
||||
/**
|
||||
* @cond DO_NOT_SHOW
|
||||
*
|
||||
* Utility/support macros. Defined to enable RefPtr<T> to contain types like 'const T' because we do not
|
||||
* regard retain()/release() as affecting mutability of state.
|
||||
*/
|
||||
|
@ -307,8 +306,7 @@ template<class T, class U> RefPtr<T> dynamic_pointer_cast(const RefPtr<U> & r)
|
|||
#undef CC_REF_PTR_SAFE_RELEASE
|
||||
#undef CC_REF_PTR_SAFE_RELEASE_NULL
|
||||
|
||||
/** @} */
|
||||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CC_REF_PTR_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __SUPPORT_DATA_SUPPORT_TGALIB_H__
|
||||
#define __SUPPORT_DATA_SUPPORT_TGALIB_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
|
@ -73,4 +74,5 @@ void tgaDestroy(tImageTGA *info);
|
|||
|
||||
}//namespace cocos2d
|
||||
|
||||
/// @endcond
|
||||
#endif // __SUPPORT_DATA_SUPPORT_TGALIB_H__
|
||||
|
|
|
@ -22,8 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __SUPPORT_ZIPUTILS_H__
|
||||
#define __SUPPORT_ZIPUTILS_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string>
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
@ -294,5 +296,5 @@ typedef struct unz_file_info_s unz_file_info;
|
|||
// end group
|
||||
/// @}
|
||||
|
||||
/// @endcond
|
||||
#endif // __SUPPORT_ZIPUTILS_H__
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_BASE_H
|
||||
#define CC_ALLOCATOR_BASE_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -113,5 +113,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_BASE_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_DIAGNOSTICS_H
|
||||
#define CC_ALLOCATOR_DIAGNOSTICS_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
|
@ -59,5 +59,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_DIAGNOSTICS_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_GLOBAL_H
|
||||
#define CC_ALLOCATOR_GLOBAL_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/allocator/CCAllocatorMacros.h"
|
||||
#include "base/allocator/CCAllocatorStrategyDefault.h"
|
||||
|
@ -40,5 +40,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_GLOBAL_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_MACROS_H
|
||||
#define CC_ALLOCATOR_MACROS_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/ccConfig.h"
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
@ -128,5 +128,4 @@
|
|||
}
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_MACROS_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_MUTEX_H
|
||||
#define CC_ALLOCATOR_MUTEX_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
|
@ -122,5 +122,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_MUTEX_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_STRATEGY_DEFAULT_H
|
||||
#define CC_ALLOCATOR_STRATEGY_DEFAULT_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/allocator/CCAllocatorMacros.h"
|
||||
#include "base/allocator/CCAllocatorBase.h"
|
||||
|
@ -56,5 +56,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_STRATEGY_DEFAULT_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_STRATEGY_FIXED_BLOCK_H
|
||||
#define CC_ALLOCATOR_STRATEGY_FIXED_BLOCK_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
/****************************************************************************
|
||||
WARNING!
|
||||
|
@ -274,5 +274,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_STRATEGY_FIXED_BLOCK_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_STRATEGY_GLOBAL_SMALL_BLOCK_H
|
||||
#define CC_ALLOCATOR_STRATEGY_GLOBAL_SMALL_BLOCK_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
/****************************************************************************
|
||||
WARNING!
|
||||
|
@ -316,5 +316,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_STRATEGY_GLOBAL_SMALL_BLOCK_H
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifndef CC_ALLOCATOR_STRATEGY_POOL_H
|
||||
#define CC_ALLOCATOR_STRATEGY_POOL_H
|
||||
/// @cond
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <vector>
|
||||
#include <typeinfo>
|
||||
|
@ -169,5 +169,4 @@ NS_CC_ALLOCATOR_END
|
|||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
|
||||
#endif//CC_ALLOCATOR_STRATEGY_POOL_H
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef COCOS2DX_PLATFORM_THIRDPARTY_ATITC_
|
||||
#define COCOS2DX_PLATFORM_THIRDPARTY_ATITC_
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCStdC.h"
|
||||
|
||||
|
@ -43,6 +43,5 @@ void atitc_decode(uint8_t *encode_data,
|
|||
ATITCDecodeFlag decodeFlag
|
||||
);
|
||||
|
||||
|
||||
/// @endcond
|
||||
#endif /* defined(COCOS2DX_PLATFORM_THIRDPARTY_ATITC_) */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __SUPPORT_BASE64_H__
|
||||
#define __SUPPORT_BASE64_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
|
@ -64,4 +65,5 @@ int CC_DLL base64Encode(const unsigned char *in, unsigned int inLength, char **o
|
|||
}
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
#endif // __SUPPORT_BASE64_H__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2007 Scott Lembcke
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -42,6 +42,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef CC_ARRAY_H
|
||||
#define CC_ARRAY_H
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/ccMacros.h"
|
||||
#include "base/CCRef.h"
|
||||
|
@ -203,4 +204,5 @@ void ccCArrayFullRemoveArray(ccCArray *arr, ccCArray *minusArr);
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // CC_ARRAY_H
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
/*
|
||||
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
||||
*
|
||||
* Copyright (c) 2012 Zynga Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
/****************************************************************************
|
||||
Copyright (c) 2012 Zynga Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BASE_CCFPSIMAGES__H
|
||||
#define __BASE_CCFPSIMAGES__H
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -36,4 +38,5 @@ unsigned int cc_fps_images_len(void);
|
|||
}
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
#endif // __BASE_CCFPSIMAGES__H
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#ifndef __etc1_h__
|
||||
#define __etc1_h__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#define ETC1_ENCODED_BLOCK_SIZE 8
|
||||
#define ETC1_DECODED_BLOCK_SIZE 48
|
||||
|
@ -103,4 +104,5 @@ etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader);
|
|||
}
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/// @cond DO_NOT_SHOW
|
||||
|
||||
const unsigned char __firePngData[] = {
|
||||
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7A, 0x7A,
|
||||
|
@ -46,3 +48,5 @@ const unsigned char __firePngData[] = {
|
|||
0x72, 0x89, 0x08, 0x10, 0x07, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42,
|
||||
0x60, 0x82
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef COCOS2DX_PLATFORM_THIRDPARTY_S3TC_
|
||||
#define COCOS2DX_PLATFORM_THIRDPARTY_S3TC_
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCStdC.h"
|
||||
|
||||
|
@ -43,6 +43,5 @@ enum class S3TCDecodeFlag
|
|||
S3TCDecodeFlag decodeFlag
|
||||
);
|
||||
|
||||
|
||||
/// @endcond
|
||||
#endif /* defined(COCOS2DX_PLATFORM_THIRDPARTY_S3TC_) */
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef UTHASH_H
|
||||
#define UTHASH_H
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <string.h> /* memcmp,strlen */
|
||||
#include <stddef.h> /* ptrdiff_t */
|
||||
|
@ -937,4 +938,5 @@ typedef struct UT_hash_handle {
|
|||
unsigned hashv; /* result of hash-fcn(key) */
|
||||
} UT_hash_handle;
|
||||
|
||||
/// @endcond
|
||||
#endif /* UTHASH_H */
|
||||
|
|
|
@ -23,6 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef UTLIST_H
|
||||
#define UTLIST_H
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#define UTLIST_VERSION 1.9.8
|
||||
|
||||
|
@ -724,5 +725,5 @@ do {
|
|||
} \
|
||||
} while (0) \
|
||||
|
||||
/// @endcond
|
||||
#endif /* UTLIST_H */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -23,8 +23,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCARRAY_H__
|
||||
#define __CCARRAY_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#define CC_USE_ARRAY_VECTOR 0
|
||||
|
||||
|
@ -556,4 +558,5 @@ public:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CCARRAY_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ Copyright (c) 2013-2014 Chukong Technologies Inc.
|
|||
|
||||
#ifndef __CCBOOL_H__
|
||||
#define __CCBOOL_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/CCDataVisitor.h"
|
||||
|
@ -69,4 +70,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* __CCBOOL_H__ */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
/** Add deprecated global functions and variables here
|
||||
*/
|
||||
|
||||
|
@ -1155,5 +1157,5 @@ CC_DEPRECATED_ATTRIBUTE CC_DLL Vec4* kmVec4Transform(Vec4* pOut, const Vec4* pV,
|
|||
|
||||
NS_CC_END
|
||||
|
||||
|
||||
/// @endcond
|
||||
#endif // __COCOS2D_CCDEPRECATED_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2012 cocos2d-x.org
|
||||
opyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
opyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CCDICTIONARY_H__
|
||||
#define __CCDICTIONARY_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/uthash.h"
|
||||
#include "base/CCRef.h"
|
||||
|
@ -456,4 +457,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* __CCDICTIONARY_H__ */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifndef __CCDOUBLE_H__
|
||||
#define __CCDOUBLE_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/CCDataVisitor.h"
|
||||
|
@ -68,4 +69,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* __CCDOUBLE_H__ */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifndef __CCFLOAT_H__
|
||||
#define __CCFLOAT_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/CCDataVisitor.h"
|
||||
|
@ -69,4 +70,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* __CCFLOAT_H__ */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifndef __CCINTEGER_H__
|
||||
#define __CCINTEGER_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/CCConsole.h"
|
||||
|
@ -78,4 +79,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* __CCINTEGER_H__ */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2011 Erawppa
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -26,6 +26,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CCNOTIFICATIONCENTER_H__
|
||||
#define __CCNOTIFICATIONCENTER_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/ccTypes.h"
|
||||
|
@ -208,4 +209,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif//__CCNOTIFICATIONCENTER_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CC_SET_H__
|
||||
#define __CC_SET_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <set>
|
||||
#include "base/CCRef.h"
|
||||
|
@ -117,5 +118,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CC_SET_H__
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -22,8 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCSTRING_H__
|
||||
#define __CCSTRING_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
|
||||
#include <string.h>
|
||||
|
@ -224,4 +226,5 @@ std::string CC_DLL format(const char* format, ...) CC_FORMAT_PRINTF(1, 2);
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif //__CCSTRING_H__
|
||||
|
|
|
@ -82,9 +82,12 @@ VisibleFrame::VisibleFrame()
|
|||
}
|
||||
|
||||
void VisibleFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node)
|
||||
{
|
||||
_node->setVisible(_visible);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Frame* VisibleFrame::clone()
|
||||
|
@ -170,6 +173,11 @@ RotationFrame::RotationFrame()
|
|||
|
||||
void RotationFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setRotation(_rotation);
|
||||
|
||||
if(_tween)
|
||||
|
@ -180,7 +188,7 @@ void RotationFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void RotationFrame::apply(float percent)
|
||||
{
|
||||
if (_tween && _betwennRotation != 0)
|
||||
if (_node && _tween && _betwennRotation != 0)
|
||||
{
|
||||
float rotation = _rotation + percent * _betwennRotation;
|
||||
_node->setRotation(rotation);
|
||||
|
@ -220,6 +228,11 @@ SkewFrame::SkewFrame()
|
|||
|
||||
void SkewFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setSkewX(_skewX);
|
||||
_node->setSkewY(_skewY);
|
||||
|
||||
|
@ -232,7 +245,7 @@ void SkewFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void SkewFrame::apply(float percent)
|
||||
{
|
||||
if (_tween && (_betweenSkewX != 0 || _betweenSkewY != 0))
|
||||
if (_node && _tween && (_betweenSkewX != 0 || _betweenSkewY != 0))
|
||||
{
|
||||
float skewx = _skewX + percent * _betweenSkewX;
|
||||
float skewy = _skewY + percent * _betweenSkewY;
|
||||
|
@ -275,6 +288,11 @@ RotationSkewFrame::RotationSkewFrame()
|
|||
|
||||
void RotationSkewFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setRotationSkewX(_skewX);
|
||||
_node->setRotationSkewY(_skewY);
|
||||
|
||||
|
@ -287,7 +305,7 @@ void RotationSkewFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void RotationSkewFrame::apply(float percent)
|
||||
{
|
||||
if (_tween && (_betweenSkewX != 0 || _betweenSkewY != 0))
|
||||
if (_node && _tween && (_betweenSkewX != 0 || _betweenSkewY != 0))
|
||||
{
|
||||
float skewx = _skewX + percent * _betweenSkewX;
|
||||
float skewy = _skewY + percent * _betweenSkewY;
|
||||
|
@ -329,6 +347,11 @@ PositionFrame::PositionFrame()
|
|||
|
||||
void PositionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setPosition(_position);
|
||||
|
||||
if(_tween)
|
||||
|
@ -340,7 +363,7 @@ void PositionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void PositionFrame::apply(float percent)
|
||||
{
|
||||
if (_tween && (_betweenX != 0 || _betweenY != 0))
|
||||
if (_node && _tween && (_betweenX != 0 || _betweenY != 0))
|
||||
{
|
||||
Point p;
|
||||
p.x = _position.x + _betweenX * percent;
|
||||
|
@ -382,6 +405,11 @@ ScaleFrame::ScaleFrame()
|
|||
|
||||
void ScaleFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setScaleX(_scaleX);
|
||||
_node->setScaleY(_scaleY);
|
||||
|
||||
|
@ -394,7 +422,7 @@ void ScaleFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void ScaleFrame::apply(float percent)
|
||||
{
|
||||
if (_tween && (_betweenScaleX != 0 || _betweenScaleY != 0))
|
||||
if (_node && _tween && (_betweenScaleX != 0 || _betweenScaleY != 0))
|
||||
{
|
||||
float scaleX = _scaleX + _betweenScaleX * percent;
|
||||
float scaleY = _scaleY + _betweenScaleY * percent;
|
||||
|
@ -436,6 +464,11 @@ AnchorPointFrame::AnchorPointFrame()
|
|||
|
||||
void AnchorPointFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setAnchorPoint(_anchorPoint);
|
||||
}
|
||||
|
||||
|
@ -480,6 +513,11 @@ InnerActionFrame::InnerActionFrame()
|
|||
|
||||
void InnerActionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto innerActiontimeline = static_cast<ActionTimeline*>(_node->getActionByTag(_node->getTag()));
|
||||
if( nullptr == innerActiontimeline)
|
||||
return;
|
||||
|
@ -601,6 +639,10 @@ ColorFrame::ColorFrame()
|
|||
|
||||
void ColorFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_node->setColor(_color);
|
||||
|
||||
if(_tween)
|
||||
|
@ -614,7 +656,7 @@ void ColorFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void ColorFrame::apply(float percent)
|
||||
{
|
||||
if (_tween && (_betweenRed != 0 || _betweenGreen != 0 || _betweenBlue != 0))
|
||||
if (_node && _tween && (_betweenRed != 0 || _betweenGreen != 0 || _betweenBlue != 0))
|
||||
{
|
||||
Color3B color;
|
||||
color.r = _color.r+ _betweenRed * percent;
|
||||
|
@ -655,6 +697,11 @@ AlphaFrame::AlphaFrame()
|
|||
|
||||
void AlphaFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
||||
{
|
||||
if (_node == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_node->setOpacity(_alpha);
|
||||
|
||||
if (_tween)
|
||||
|
@ -665,7 +712,7 @@ void AlphaFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void AlphaFrame::apply(float percent)
|
||||
{
|
||||
if (_tween)
|
||||
if (_node && _tween)
|
||||
{
|
||||
GLubyte alpha = _alpha + _betweenAlpha * percent;
|
||||
_node->setOpacity(alpha);
|
||||
|
|
|
@ -33,6 +33,17 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/**@{
|
||||
Affine transform
|
||||
a b 0
|
||||
c d 0
|
||||
tx ty 1
|
||||
|
||||
Identity
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
*/
|
||||
struct CC_DLL AffineTransform {
|
||||
float a, b, c, d;
|
||||
float tx, ty;
|
||||
|
@ -40,28 +51,57 @@ struct CC_DLL AffineTransform {
|
|||
static const AffineTransform IDENTITY;
|
||||
};
|
||||
|
||||
/**@}*/
|
||||
|
||||
/**Make affine transform.*/
|
||||
CC_DLL AffineTransform __CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty);
|
||||
#define AffineTransformMake __CCAffineTransformMake
|
||||
|
||||
/**Multiply point (x,y,1) by a affine tranform.*/
|
||||
CC_DLL Vec2 __CCPointApplyAffineTransform(const Vec2& point, const AffineTransform& t);
|
||||
#define PointApplyAffineTransform __CCPointApplyAffineTransform
|
||||
|
||||
/**Multiply size (width,height,0) by a affine tranform.*/
|
||||
CC_DLL Size __CCSizeApplyAffineTransform(const Size& size, const AffineTransform& t);
|
||||
#define SizeApplyAffineTransform __CCSizeApplyAffineTransform
|
||||
|
||||
/**Make identity affine transform.*/
|
||||
CC_DLL AffineTransform AffineTransformMakeIdentity();
|
||||
/**Transform Rect, which will transform the four vertice of the point.*/
|
||||
CC_DLL Rect RectApplyAffineTransform(const Rect& rect, const AffineTransform& anAffineTransform);
|
||||
|
||||
/**@{
|
||||
Transform vec2 and Rect by Mat4.
|
||||
*/
|
||||
CC_DLL Rect RectApplyTransform(const Rect& rect, const Mat4& transform);
|
||||
CC_DLL Vec2 PointApplyTransform(const Vec2& point, const Mat4& transform);
|
||||
|
||||
/**@}*/
|
||||
/**
|
||||
Translation, equals
|
||||
1 0 1
|
||||
0 1 0 * affinetransform
|
||||
tx ty 1
|
||||
*/
|
||||
CC_DLL AffineTransform AffineTransformTranslate(const AffineTransform& t, float tx, float ty);
|
||||
/**
|
||||
Rotation, equals
|
||||
cos(angle) sin(angle) 0
|
||||
-sin(angle) cos(angle) 0 * AffineTransform
|
||||
0 0 1
|
||||
*/
|
||||
CC_DLL AffineTransform AffineTransformRotate(const AffineTransform& aTransform, float anAngle);
|
||||
/**
|
||||
Scale, equals
|
||||
sx 0 0
|
||||
0 sy 0 * affineTransform
|
||||
0 0 1
|
||||
*/
|
||||
CC_DLL AffineTransform AffineTransformScale(const AffineTransform& t, float sx, float sy);
|
||||
/**Concat two affine transform, t1 * t2*/
|
||||
CC_DLL AffineTransform AffineTransformConcat(const AffineTransform& t1, const AffineTransform& t2);
|
||||
/**Compare affine transform.*/
|
||||
CC_DLL bool AffineTransformEqualToTransform(const AffineTransform& t1, const AffineTransform& t2);
|
||||
/**Get the inverse of affine transform.*/
|
||||
CC_DLL AffineTransform AffineTransformInvert(const AffineTransform& t);
|
||||
|
||||
/**Concat Mat4, return t1 * t2.*/
|
||||
CC_DLL Mat4 TransformConcat(const Mat4& t1, const Mat4& t2);
|
||||
|
||||
extern CC_DLL const AffineTransform AffineTransformIdentity;
|
||||
|
|
|
@ -42,9 +42,12 @@ NS_CC_BEGIN
|
|||
class CC_DLL Size
|
||||
{
|
||||
public:
|
||||
/**Width of the Size.*/
|
||||
float width;
|
||||
/**Height of the Size.*/
|
||||
float height;
|
||||
public:
|
||||
/**Conversion from Vec2 to Size.*/
|
||||
operator Vec2() const
|
||||
{
|
||||
return Vec2(width, height);
|
||||
|
@ -52,23 +55,19 @@ public:
|
|||
|
||||
public:
|
||||
/**
|
||||
* @js NA
|
||||
@{
|
||||
Constructor.
|
||||
@param width Width of the size.
|
||||
@param height Height of the size.
|
||||
@param other Copy constructor.
|
||||
@param point Conversion from a point.
|
||||
*/
|
||||
Size();
|
||||
/**
|
||||
* @js NA
|
||||
*/
|
||||
Size(float width, float height);
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
Size(const Size& other);
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
explicit Size(const Vec2& point);
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -100,34 +99,42 @@ public:
|
|||
*/
|
||||
Size operator/(float a) const;
|
||||
/**
|
||||
Set the width and height of Size.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
void setSize(float width, float height);
|
||||
/**
|
||||
Check if two size is the same.
|
||||
* @js NA
|
||||
*/
|
||||
bool equals(const Size& target) const;
|
||||
|
||||
/**Size(0,0).*/
|
||||
static const Size ZERO;
|
||||
};
|
||||
|
||||
/**Rectangle area.*/
|
||||
class CC_DLL Rect
|
||||
{
|
||||
public:
|
||||
/**Low left point of rect.*/
|
||||
Vec2 origin;
|
||||
/**Width and height of the rect.*/
|
||||
Size size;
|
||||
|
||||
public:
|
||||
/**
|
||||
Constructor an empty Rect.
|
||||
* @js NA
|
||||
*/
|
||||
Rect();
|
||||
/**
|
||||
Constructor a rect.
|
||||
* @js NA
|
||||
*/
|
||||
Rect(float x, float y, float width, float height);
|
||||
/**
|
||||
Copy constructor.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
|
@ -138,54 +145,65 @@ public:
|
|||
*/
|
||||
Rect& operator= (const Rect& other);
|
||||
/**
|
||||
Set the x, y, width and height of Rect.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
void setRect(float x, float y, float width, float height);
|
||||
/**
|
||||
Get the left of the rect.
|
||||
* @js NA
|
||||
*/
|
||||
float getMinX() const; /// return the leftmost x-value of current rect
|
||||
/**
|
||||
Get the X coordinate of center point.
|
||||
* @js NA
|
||||
*/
|
||||
float getMidX() const; /// return the midpoint x-value of current rect
|
||||
/**
|
||||
Get the right of rect.
|
||||
* @js NA
|
||||
*/
|
||||
float getMaxX() const; /// return the rightmost x-value of current rect
|
||||
/**
|
||||
Get the bottom of rect.
|
||||
* @js NA
|
||||
*/
|
||||
float getMinY() const; /// return the bottommost y-value of current rect
|
||||
/**
|
||||
Get the Y coordinate of center point.
|
||||
* @js NA
|
||||
*/
|
||||
float getMidY() const; /// return the midpoint y-value of current rect
|
||||
/**
|
||||
Get top of rect.
|
||||
* @js NA
|
||||
*/
|
||||
float getMaxY() const; /// return the topmost y-value of current rect
|
||||
/**
|
||||
Compare two rects.
|
||||
* @js NA
|
||||
*/
|
||||
bool equals(const Rect& rect) const;
|
||||
/**
|
||||
Check if the points is contained in the rect.
|
||||
* @js NA
|
||||
*/
|
||||
bool containsPoint(const Vec2& point) const;
|
||||
/**
|
||||
Check the intersect status of two rects.
|
||||
* @js NA
|
||||
*/
|
||||
bool intersectsRect(const Rect& rect) const;
|
||||
/**
|
||||
Get the min rect which can contain this and rect.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
Rect unionWithRect(const Rect & rect) const;
|
||||
|
||||
/**Compute the min rect which can contain this and rect, assign it to this.*/
|
||||
void merge(const Rect& rect);
|
||||
|
||||
/**An empty Rect.*/
|
||||
static const Rect ZERO;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/**
|
||||
Copyright 2013 BlackBerry Inc.
|
||||
Copyright (c) 2014-2015 Chukong Technologies
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/**
|
||||
Copyright 2013 BlackBerry Inc.
|
||||
Copyright (c) 2014-2015 Chukong Technologies
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/**
|
||||
Copyright 2013 BlackBerry Inc.
|
||||
Copyright (c) 2014-2015 Chukong Technologies
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -21,8 +21,10 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __HTTPASYNCONNECTION_H__
|
||||
#define __HTTPASYNCONNECTION_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Security/Security.h>
|
||||
|
@ -58,5 +60,6 @@
|
|||
-(void) startRequest:(NSURLRequest*)request;
|
||||
|
||||
@end
|
||||
|
||||
/// @endcond
|
||||
#endif //__HTTPASYNCONNECTION_H__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifndef HTTP_COOKIE_H
|
||||
#define HTTP_COOKIE_H
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
struct CookiesInfo
|
||||
{
|
||||
|
@ -53,4 +54,5 @@ private:
|
|||
std::vector<CookiesInfo> _cookies;
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
#endif /* HTTP_COOKIE_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __PLATFORM_CCAPPLICATION_H__
|
||||
#define __PLATFORM_CCAPPLICATION_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
|
@ -42,4 +43,5 @@ THE SOFTWARE.
|
|||
#include "platform/linux/CCApplication-linux.h"
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
#endif /* __PLATFORM_CCAPPLICATION_H__*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CC_COMMON_H__
|
||||
#define __CC_COMMON_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
|
@ -76,4 +77,5 @@ enum class LanguageType
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CC_COMMON_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __PLATFORM_CCGL_H__
|
||||
#define __PLATFORM_CCGL_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
|
@ -42,4 +43,5 @@ THE SOFTWARE.
|
|||
#include "platform/linux/CCGL-linux.h"
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
#endif /* __PLATFORM_CCPLATFORMDEFINE_H__*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CC_IMAGE_H__
|
||||
#define __CC_IMAGE_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "renderer/CCTexture2D.h"
|
||||
|
@ -217,4 +218,5 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CC_IMAGE_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __BASE_CC_PLATFORM_CONFIG_H__
|
||||
#define __BASE_CC_PLATFORM_CONFIG_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
/**
|
||||
Config of cocos2d-x project, per target platform.
|
||||
|
@ -156,5 +157,5 @@ THE SOFTWARE.
|
|||
#endif
|
||||
#endif // CC_PLATFORM_WIN32
|
||||
|
||||
/// @endcond
|
||||
#endif // __BASE_CC_PLATFORM_CONFIG_H__
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __PLATFORM_CCPLATFORMDEFINE_H__
|
||||
#define __PLATFORM_CCPLATFORMDEFINE_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
|
@ -42,4 +43,5 @@ THE SOFTWARE.
|
|||
#include "platform/linux/CCPlatformDefine-linux.h"
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
#endif /* __PLATFORM_CCPLATFORMDEFINE_H__*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
Copyright (c) 2013-2015 Chukong Technologies
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -22,19 +22,21 @@ Copyright (c) 2013-2014 Chukong Technologies
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CC_PLATFORM_MACROS_H__
|
||||
#define __CC_PLATFORM_MACROS_H__
|
||||
|
||||
/**
|
||||
* define some platform specific macros
|
||||
* Define some platform specific macros.
|
||||
*/
|
||||
#include "base/ccConfig.h"
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#include "platform/CCPlatformDefine.h"
|
||||
|
||||
/**
|
||||
* define a create function for a specific type, such as Layer
|
||||
* @param \__TYPE__ class type to add create(), such as Layer
|
||||
/** @def CREATE_FUNC(__TYPE__)
|
||||
* Define a create function for a specific type, such as Layer.
|
||||
*
|
||||
* @param __TYPE__ class type to add create(), such as Layer.
|
||||
*/
|
||||
#define CREATE_FUNC(__TYPE__) \
|
||||
static __TYPE__* create() \
|
||||
|
@ -53,9 +55,10 @@ static __TYPE__* create() \
|
|||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
* define a node function for a specific type, such as Layer
|
||||
* @param \__TYPE__ class type to add node(), such as Layer
|
||||
/** @def NODE_FUNC(__TYPE__)
|
||||
* Define a node function for a specific type, such as Layer.
|
||||
*
|
||||
* @param __TYPE__ class type to add node(), such as Layer.
|
||||
* @deprecated This interface will be deprecated sooner or later.
|
||||
*/
|
||||
#define NODE_FUNC(__TYPE__) \
|
||||
|
@ -76,11 +79,11 @@ CC_DEPRECATED_ATTRIBUTE static __TYPE__* node() \
|
|||
}
|
||||
|
||||
/** @def CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
Enable it if you want to cache the texture data.
|
||||
Not enabling for Emscripten any more -- doesn't seem necessary and don't want
|
||||
to be different from other platforms unless there's a good reason.
|
||||
|
||||
It's new in cocos2d-x since v0.99.5
|
||||
* Enable it if you want to cache the texture data.
|
||||
* Not enabling for Emscripten any more -- doesn't seem necessary and don't want
|
||||
* to be different from other platforms unless there's a good reason.
|
||||
*
|
||||
* @since v0.99.5
|
||||
*/
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
#define CC_ENABLE_CACHE_TEXTURE_DATA 1
|
||||
|
@ -89,17 +92,18 @@ It's new in cocos2d-x since v0.99.5
|
|||
#endif
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
|
||||
/* Application will crash in glDrawElements function on some win32 computers and some android devices.
|
||||
Indices should be bound again while drawing to avoid this bug.
|
||||
/** Application will crash in glDrawElements function on some win32 computers and some android devices.
|
||||
* Indices should be bound again while drawing to avoid this bug.
|
||||
*/
|
||||
#define CC_REBIND_INDICES_BUFFER 1
|
||||
#else
|
||||
#define CC_REBIND_INDICES_BUFFER 0
|
||||
#endif
|
||||
|
||||
// generic macros
|
||||
// Generic macros
|
||||
|
||||
// namespace cocos2d {}
|
||||
/// @name namespace cocos2d
|
||||
/// @{
|
||||
#ifdef __cplusplus
|
||||
#define NS_CC_BEGIN namespace cocos2d {
|
||||
#define NS_CC_END }
|
||||
|
@ -111,15 +115,18 @@ It's new in cocos2d-x since v0.99.5
|
|||
#define USING_NS_CC
|
||||
#define NS_CC
|
||||
#endif
|
||||
// end of namespace group
|
||||
/// @}
|
||||
|
||||
/** CC_PROPERTY_READONLY is used to declare a protected variable.
|
||||
We can use getter to read the variable.
|
||||
@param varType the type of variable.
|
||||
@param varName variable name.
|
||||
@param funName "get + funName" will be the name of the getter.
|
||||
@warning The getter is a public virtual function, you should rewrite it first.
|
||||
The variables and methods declared after CC_PROPERTY_READONLY are all public.
|
||||
If you need protected or private, please declare.
|
||||
/** @def CC_PROPERTY_READONLY
|
||||
* It is used to declare a protected variable. We can use getter to read the variable.
|
||||
*
|
||||
* @param varType the type of variable.
|
||||
* @param varName variable name.
|
||||
* @param funName "get + funName" will be the name of the getter.
|
||||
* @warning The getter is a public virtual function, you should rewrite it first.
|
||||
* The variables and methods declared after CC_PROPERTY_READONLY are all public.
|
||||
* If you need protected or private, please declare.
|
||||
*/
|
||||
#define CC_PROPERTY_READONLY(varType, varName, funName)\
|
||||
protected: varType varName;\
|
||||
|
@ -129,15 +136,17 @@ public: virtual varType get##funName(void) const;
|
|||
protected: varType varName;\
|
||||
public: virtual const varType& get##funName(void) const;
|
||||
|
||||
/** CC_PROPERTY is used to declare a protected variable.
|
||||
We can use getter to read the variable, and use the setter to change the variable.
|
||||
@param varType the type of variable.
|
||||
@param varName variable name.
|
||||
@param funName "get + funName" will be the name of the getter.
|
||||
"set + funName" will be the name of the setter.
|
||||
@warning The getter and setter are public virtual functions, you should rewrite them first.
|
||||
The variables and methods declared after CC_PROPERTY are all public.
|
||||
If you need protected or private, please declare.
|
||||
/** @def CC_PROPERTY
|
||||
* It is used to declare a protected variable.
|
||||
* We can use getter to read the variable, and use the setter to change the variable.
|
||||
*
|
||||
* @param varType The type of variable.
|
||||
* @param varName Variable name.
|
||||
* @param funName "get + funName" will be the name of the getter.
|
||||
* "set + funName" will be the name of the setter.
|
||||
* @warning The getter and setter are public virtual functions, you should rewrite them first.
|
||||
* The variables and methods declared after CC_PROPERTY are all public.
|
||||
* If you need protected or private, please declare.
|
||||
*/
|
||||
#define CC_PROPERTY(varType, varName, funName)\
|
||||
protected: varType varName;\
|
||||
|
@ -149,14 +158,15 @@ protected: varType varName;\
|
|||
public: virtual const varType& get##funName(void) const;\
|
||||
public: virtual void set##funName(const varType& var);
|
||||
|
||||
/** CC_SYNTHESIZE_READONLY is used to declare a protected variable.
|
||||
We can use getter to read the variable.
|
||||
@param varType the type of variable.
|
||||
@param varName variable name.
|
||||
@param funName "get + funName" will be the name of the getter.
|
||||
@warning The getter is a public inline function.
|
||||
The variables and methods declared after CC_SYNTHESIZE_READONLY are all public.
|
||||
If you need protected or private, please declare.
|
||||
/** @def CC_SYNTHESIZE_READONLY
|
||||
* It is used to declare a protected variable. We can use getter to read the variable.
|
||||
*
|
||||
* @param varType The type of variable.
|
||||
* @param varName Variable name.
|
||||
* @param funName "get + funName" will be the name of the getter.
|
||||
* @warning The getter is a public inline function.
|
||||
* The variables and methods declared after CC_SYNTHESIZE_READONLY are all public.
|
||||
* If you need protected or private, please declare.
|
||||
*/
|
||||
#define CC_SYNTHESIZE_READONLY(varType, varName, funName)\
|
||||
protected: varType varName;\
|
||||
|
@ -166,15 +176,17 @@ public: virtual varType get##funName(void) const { return varName; }
|
|||
protected: varType varName;\
|
||||
public: virtual const varType& get##funName(void) const { return varName; }
|
||||
|
||||
/** CC_SYNTHESIZE is used to declare a protected variable.
|
||||
We can use getter to read the variable, and use the setter to change the variable.
|
||||
@param varType the type of variable.
|
||||
@param varName variable name.
|
||||
@param funName "get + funName" will be the name of the getter.
|
||||
"set + funName" will be the name of the setter.
|
||||
@warning The getter and setter are public inline functions.
|
||||
The variables and methods declared after CC_SYNTHESIZE are all public.
|
||||
If you need protected or private, please declare.
|
||||
/** @def CC_SYNTHESIZE
|
||||
* It is used to declare a protected variable.
|
||||
* We can use getter to read the variable, and use the setter to change the variable.
|
||||
*
|
||||
* @param varType The type of variable.
|
||||
* @param varName Variable name.
|
||||
* @param funName "get + funName" will be the name of the getter.
|
||||
* "set + funName" will be the name of the setter.
|
||||
* @warning The getter and setter are public inline functions.
|
||||
* The variables and methods declared after CC_SYNTHESIZE are all public.
|
||||
* If you need protected or private, please declare.
|
||||
*/
|
||||
#define CC_SYNTHESIZE(varType, varName, funName)\
|
||||
protected: varType varName;\
|
||||
|
@ -210,7 +222,8 @@ public: virtual void set##funName(varType var) \
|
|||
#define __CCLOGWITHFUNCTION(s, ...) \
|
||||
log("%s : %s",__FUNCTION__, StringUtils::format(s, ##__VA_ARGS__).c_str())
|
||||
|
||||
// cocos2d debug
|
||||
/// @name Cocos2d debug
|
||||
/// @{
|
||||
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
|
||||
#define CCLOG(...) do {} while (0)
|
||||
#define CCLOGINFO(...) do {} while (0)
|
||||
|
@ -230,15 +243,20 @@ public: virtual void set##funName(varType var) \
|
|||
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
|
||||
#endif // COCOS2D_DEBUG
|
||||
|
||||
// Lua engine debug
|
||||
/** Lua engine debug */
|
||||
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 || CC_LUA_ENGINE_DEBUG == 0
|
||||
#define LUALOG(...)
|
||||
#else
|
||||
#define LUALOG(format, ...) cocos2d::log(format, ##__VA_ARGS__)
|
||||
#endif // Lua engine debug
|
||||
|
||||
// A macro to disallow the copy constructor and operator= functions
|
||||
// This should be used in the private: declarations for a class
|
||||
// end of debug group
|
||||
/// @}
|
||||
|
||||
/** @def CC_DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
* A macro to disallow the copy constructor and operator= functions.
|
||||
* This should be used in the private: declarations for a class
|
||||
*/
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUG__ == 4) && (__GNUC_MINOR__ >= 4))) \
|
||||
|| (defined(__clang__) && (__clang_major__ >= 3)) || (_MSC_VER >= 1800)
|
||||
#define CC_DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
|
@ -250,18 +268,20 @@ public: virtual void set##funName(varType var) \
|
|||
TypeName &operator =(const TypeName &);
|
||||
#endif
|
||||
|
||||
// A macro to disallow all the implicit constructors, namely the
|
||||
// default constructor, copy constructor and operator= functions.
|
||||
//
|
||||
// This should be used in the private: declarations for a class
|
||||
// that wants to prevent anyone from instantiating it. This is
|
||||
// especially useful for classes containing only static methods.
|
||||
/** @def CC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
|
||||
* A macro to disallow all the implicit constructors, namely the
|
||||
* default constructor, copy constructor and operator= functions.
|
||||
*
|
||||
* This should be used in the private: declarations for a class
|
||||
* that wants to prevent anyone from instantiating it. This is
|
||||
* especially useful for classes containing only static methods.
|
||||
*/
|
||||
#define CC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
||||
TypeName(); \
|
||||
CC_DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
|
||||
/*
|
||||
* only certain compilers support __attribute__((deprecated))
|
||||
/** @def CC_DEPRECATED_ATTRIBUTE
|
||||
* Only certain compilers support __attribute__((deprecated)).
|
||||
*/
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||
#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
||||
|
@ -271,17 +291,18 @@ public: virtual void set##funName(varType var) \
|
|||
#define CC_DEPRECATED_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* macro to mark things deprecated as of a particular version
|
||||
* can be used with artibrary parameters which are thrown away
|
||||
/** @def CC_DEPRECATED(...)
|
||||
* Macro to mark things deprecated as of a particular version
|
||||
* can be used with artibrary parameters which are thrown away.
|
||||
* e.g. CC_DEPRECATED(4.0) or CC_DEPRECATED(4.0, "not going to need this anymore") etc.
|
||||
*/
|
||||
#define CC_DEPRECATED(...) CC_DEPRECATED_ATTRIBUTE
|
||||
|
||||
/*
|
||||
* only certain compiler support __attribute__((format))
|
||||
* formatPos - 1-based position of format string argument
|
||||
* argPos - 1-based position of first format-dependent argument
|
||||
/** @def CC_FORMAT_PRINTF(formatPos, argPos)
|
||||
* Only certain compiler support __attribute__((format))
|
||||
*
|
||||
* @param formatPos 1-based position of format string argument.
|
||||
* @param argPos 1-based position of first format-dependent argument.
|
||||
*/
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define CC_FORMAT_PRINTF(formatPos, argPos) __attribute__((__format__(printf, formatPos, argPos)))
|
||||
|
@ -305,9 +326,9 @@ public: virtual void set##funName(varType var) \
|
|||
#define CC_UNUSED
|
||||
#endif
|
||||
|
||||
//
|
||||
// CC_REQUIRES_NULL_TERMINATION
|
||||
//
|
||||
/** @def CC_REQUIRES_NULL_TERMINATION
|
||||
*
|
||||
*/
|
||||
#if !defined(CC_REQUIRES_NULL_TERMINATION)
|
||||
#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 5549)
|
||||
#define CC_REQUIRES_NULL_TERMINATION __attribute__((sentinel(0,1)))
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#ifndef __CCSAXPARSER_H__
|
||||
#define __CCSAXPARSER_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#include "platform/CCCommon.h"
|
||||
|
@ -115,4 +116,5 @@ public:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif //__CCSAXPARSER_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -25,6 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#ifndef __CC_PLATFORM_THREAD_H__
|
||||
#define __CC_PLATFORM_THREAD_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
|
@ -61,4 +62,5 @@ public:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif // __CC_PLATFORM_THREAD_H__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __CC_RENDERCOMMANDPOOL_H__
|
||||
#define __CC_RENDERCOMMANDPOOL_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <list>
|
||||
|
||||
|
@ -98,4 +98,5 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Copyright (c) 2011 Ricardo Quesada
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (C) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (C) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -36,7 +36,7 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
|
||||
/**
|
||||
* @addtogroup shaders
|
||||
* @addtogroup support
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -44,7 +44,7 @@ class GLProgram;
|
|||
|
||||
namespace GL {
|
||||
|
||||
/** vertex attrib flags */
|
||||
/** Vertex attrib flags. */
|
||||
enum {
|
||||
VERTEX_ATTRIB_FLAG_NONE = 0,
|
||||
|
||||
|
@ -58,95 +58,116 @@ enum {
|
|||
VERTEX_ATTRIB_FLAG_POS_COLOR_TEX = (VERTEX_ATTRIB_FLAG_POSITION | VERTEX_ATTRIB_FLAG_COLOR | VERTEX_ATTRIB_FLAG_TEX_COORD),
|
||||
};
|
||||
|
||||
/** @file ccGLStateCache.h
|
||||
*/
|
||||
|
||||
/** Invalidates the GL state cache.
|
||||
If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Invalidates the GL state cache.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL invalidateStateCache(void);
|
||||
|
||||
/** Uses the GL program in case program is different than the current one.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Uses the GL program in case program is different than the current one.
|
||||
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL useProgram(GLuint program);
|
||||
|
||||
/** Deletes the GL program. If it is the one that is being used, it invalidates it.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Deletes the GL program. If it is the one that is being used, it invalidates it.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL deleteProgram(GLuint program);
|
||||
|
||||
/** Uses a blending function in case it not already used.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Uses a blending function in case it not already used.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL blendFunc(GLenum sfactor, GLenum dfactor);
|
||||
|
||||
/** Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL blendResetToCache(void);
|
||||
|
||||
/** sets the projection matrix as dirty
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Sets the projection matrix as dirty.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL setProjectionMatrixDirty(void);
|
||||
|
||||
/** Will enable the vertex attribs that are passed as flags.
|
||||
Possible flags:
|
||||
|
||||
* VERTEX_ATTRIB_FLAG_POSITION
|
||||
* VERTEX_ATTRIB_FLAG_COLOR
|
||||
* VERTEX_ATTRIB_FLAG_TEX_COORDS
|
||||
|
||||
These flags can be ORed. The flags that are not present, will be disabled.
|
||||
|
||||
@since v2.0.0
|
||||
/**
|
||||
* Will enable the vertex attribs that are passed as flags.
|
||||
* Possible flags:
|
||||
*
|
||||
* * VERTEX_ATTRIB_FLAG_POSITION
|
||||
* * VERTEX_ATTRIB_FLAG_COLOR
|
||||
* * VERTEX_ATTRIB_FLAG_TEX_COORDS
|
||||
*
|
||||
* These flags can be ORed. The flags that are not present, will be disabled.
|
||||
*
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL enableVertexAttribs(uint32_t flags);
|
||||
|
||||
/** If the texture is not already bound to texture unit 0, it binds it.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* If the texture is not already bound to texture unit 0, it binds it.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL bindTexture2D(GLuint textureId);
|
||||
|
||||
|
||||
/** If the texture is not already bound to a given unit, it binds it.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
||||
@since v2.1.0
|
||||
/**
|
||||
* If the texture is not already bound to a given unit, it binds it.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
||||
* @since v2.1.0
|
||||
*/
|
||||
void CC_DLL bindTexture2DN(GLuint textureUnit, GLuint textureId);
|
||||
|
||||
/** It will delete a given texture. If the texture was bound, it will invalidate the cached.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* It will delete a given texture. If the texture was bound, it will invalidate the cached.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL deleteTexture(GLuint textureId);
|
||||
|
||||
/** It will delete a given texture. If the texture was bound, it will invalidate the cached for the given texture unit.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
||||
@since v2.1.0
|
||||
/**
|
||||
* It will delete a given texture. If the texture was bound, it will invalidate the cached for the given texture unit.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
||||
* @since v2.1.0
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL deleteTextureN(GLuint textureUnit, GLuint textureId);
|
||||
|
||||
/** Select active texture unit.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
|
||||
@since v3.0
|
||||
/**
|
||||
* Select active texture unit.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
|
||||
* @since v3.0
|
||||
*/
|
||||
void CC_DLL activeTexture(GLenum texture);
|
||||
|
||||
/** If the vertex array is not already bound, it binds it.
|
||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
|
||||
@since v2.0.0
|
||||
/**
|
||||
* If the vertex array is not already bound, it binds it.
|
||||
*
|
||||
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
|
||||
* @since v2.0.0
|
||||
*/
|
||||
void CC_DLL bindVAO(GLuint vaoId);
|
||||
|
||||
// end of shaders group
|
||||
// end of support group
|
||||
/// @}
|
||||
|
||||
} // Namespace GL
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (c) 2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
Copyright (c) 2013-2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -23,8 +23,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCSHADER_H__
|
||||
#define __CCSHADER_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include "platform/CCGL.h"
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
|
@ -87,4 +89,5 @@ extern CC_DLL const GLchar * cc3D_Particle_color_frag;
|
|||
|
||||
NS_CC_END
|
||||
|
||||
/// @endcond
|
||||
#endif /* __CCSHADER_H__ */
|
||||
|
|
|
@ -1925,7 +1925,7 @@ bool luaval_to_mesh_vertex_attrib(lua_State* L, int lo, cocos2d::MeshVertexAttri
|
|||
ret->type = (GLenum)lua_tonumber(L, -1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "vertexAttrib"); /* L: paramStack key */
|
||||
lua_pushstring(L, "attribSizeBytes"); /* L: paramStack key */
|
||||
lua_gettable(L,lo); /* L: paramStack paramStack[lo][key] */
|
||||
ret->type = (GLenum)lua_tonumber(L, -1);
|
||||
lua_pop(L,1);
|
||||
|
@ -2304,10 +2304,10 @@ void affinetransform_to_luaval(lua_State* L,const AffineTransform& inValue)
|
|||
lua_pushnumber(L, (lua_Number) inValue.d); /* L: table key value*/
|
||||
lua_rawset(L, -3); /* table[key] = value, L: table */
|
||||
lua_pushstring(L, "tx"); /* L: table key */
|
||||
lua_pushnumber(L, (lua_Number) inValue.d); /* L: table key value*/
|
||||
lua_pushnumber(L, (lua_Number) inValue.tx); /* L: table key value*/
|
||||
lua_rawset(L, -3); /* table[key] = value, L: table */
|
||||
lua_pushstring(L, "ty"); /* L: table key */
|
||||
lua_pushnumber(L, (lua_Number) inValue.d); /* L: table key value*/
|
||||
lua_pushnumber(L, (lua_Number) inValue.ty); /* L: table key value*/
|
||||
lua_rawset(L, -3); /* table[key] = value, L: table */
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,6 +33,17 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
TOLUA_API int register_all_cocos2dx_cocosbuilder_manual(lua_State* tolua_S);
|
||||
|
||||
/**
|
||||
* Call this function can import the lua bindings for the cocosbuilder module.
|
||||
* After registering, we could call the related cocosbuilder code conveniently in the lua.eg,.cc.CCBProxy:create().
|
||||
* If you don't want to use the cocosbuilder module in the lua, you only don't call this registering function.
|
||||
* If you don't register the cocosbuilder module, the package size would become smaller .
|
||||
* The current mechanism,this registering function is called in the lua_module_register.h
|
||||
*
|
||||
* @lua NA
|
||||
* @js NA
|
||||
*/
|
||||
TOLUA_API int register_cocosbuilder_module(lua_State* tolua_S);
|
||||
|
||||
#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_LUA_COCOS2DX_COCOSBUILDER_H
|
||||
|
|
|
@ -32,6 +32,17 @@ extern "C" {
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Call this function can import the lua bindings for the cocosdenshion module.
|
||||
* After registering, we could call the related cocosdenshion code conveniently in the lua.eg,.cc.SimpleAudioEngine:getInstance():stopAllEffects().
|
||||
* In current mechanism, most bindings function of SimpleAudioEngine are wrapped in the Lua script file named AudioEngine.lua by more friednly modes.
|
||||
* If you don't want to use the cocosdenshion module in the lua, you only don't call this registering function.
|
||||
* If you don't register the cocosdenshion module, the package size would become smaller .
|
||||
* The current mechanism,this registering function is called in the lua_module_register.h
|
||||
*
|
||||
* @lua NA
|
||||
* @js NA
|
||||
*/
|
||||
TOLUA_API int register_cocosdenshion_module(lua_State* L);
|
||||
|
||||
|
||||
|
|
|
@ -32,9 +32,20 @@ extern "C" {
|
|||
}
|
||||
#endif
|
||||
|
||||
TOLUA_API int register_all_cocos2dx_extension_manual(lua_State* tolua_S);
|
||||
/**
|
||||
* Call this function can import the lua bindings for classes in the `cocos2d::extension` namespace like cocos2d::extension::Control, cocos2d::extension::ControlHuePicker, and so on.
|
||||
* After registering, we could call the related cocosbuilder code conveniently in the lua.eg,.cc.Control:create().
|
||||
* If you don't want to use the extension module in the lua, you only don't call this registering function.
|
||||
* If you don't register the extension module, the package size would become smaller .
|
||||
* The current mechanism,this registering function is called in the lua_module_register.h
|
||||
*
|
||||
* @lua NA
|
||||
* @js NA
|
||||
*/
|
||||
TOLUA_API int register_extension_module(lua_State* tolua_S);
|
||||
|
||||
TOLUA_API int register_all_cocos2dx_extension_manual(lua_State* tolua_S);
|
||||
|
||||
struct LuaAssetsManagerEventData
|
||||
{
|
||||
int value;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue