From 17bd26e9d49cf7ff373536a510f788fac5565efe Mon Sep 17 00:00:00 2001 From: SuYaohui <365886954@qq.com> Date: Fri, 27 Mar 2015 11:39:31 +0800 Subject: [PATCH] Add comments --- cocos/2d/CCAction.h | 2 +- cocos/2d/CCActionCamera.h | 4 ++-- cocos/2d/CCActionCatmullRom.h | 4 ++-- cocos/2d/CCAnimation.h | 6 +++--- cocos/2d/CCRenderTexture.h | 7 ++++--- cocos/2d/CCSprite.h | 16 ++++++++-------- cocos/2d/CCTMXLayer.h | 2 +- cocos/2d/CCTMXObjectGroup.h | 2 +- cocos/2d/CCTMXTiledMap.h | 2 +- cocos/base/CCNS.h | 6 +++--- cocos/base/ccConfig.h | 4 ++-- cocos/platform/CCGLView.h | 5 ++++- 12 files changed, 32 insertions(+), 28 deletions(-) diff --git a/cocos/2d/CCAction.h b/cocos/2d/CCAction.h index 83ba9e2a86..d98f90971d 100644 --- a/cocos/2d/CCAction.h +++ b/cocos/2d/CCAction.h @@ -109,7 +109,7 @@ public: * @param time A value between 0 and 1. */ virtual void update(float time); - /** Return certain target.. + /** Return certain target. * * @return A certain target. */ diff --git a/cocos/2d/CCActionCamera.h b/cocos/2d/CCActionCamera.h index 51c0d107b3..18ca96af41 100644 --- a/cocos/2d/CCActionCamera.h +++ b/cocos/2d/CCActionCamera.h @@ -124,9 +124,9 @@ public: * @param t Duration in seconds. * @param radius The start radius. * @param deltaRadius The delta radius. - * @param angelZ The start Angel in Z. + * @param angleZ The start Angel in Z. * @param deltaAngleZ The delta angle in Z. - * @param angelX The start Angel in X. + * @param angleX The start Angel in X. * @param deltaAngleX The delta angle in X. * @return An OrbitCamera. */ diff --git a/cocos/2d/CCActionCatmullRom.h b/cocos/2d/CCActionCatmullRom.h index 1c6c3d9ae8..22ccd2b27c 100644 --- a/cocos/2d/CCActionCatmullRom.h +++ b/cocos/2d/CCActionCatmullRom.h @@ -168,7 +168,7 @@ public: /** Creates an action with a Cardinal Spline array of points and tension. * @param duration In seconds. - * @param point An PointArray. + * @param points An PointArray. * @param tension Goodness of fit. * @code * When this function bound to js or lua,the input params are changed. @@ -192,7 +192,7 @@ public: * Initializes the action with a duration and an array of points. * * @param duration In seconds. - * @param point An PointArray. + * @param points An PointArray. * @param tension Goodness of fit. */ bool initWithDuration(float duration, PointArray* points, float tension); diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index c44cbc5628..72e089c0ab 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -45,10 +45,10 @@ class SpriteFrame; * @{ */ -/** AnimationFrame +/** @class AnimationFrame * * A frame of the animation. It contains information like: - * - sprite frame name. + * - sprite frame name. * - # of delay units. * - offset @@ -222,7 +222,7 @@ public: /** Sets the delay in seconds of the "delay unit". * - * @param setDelayPerUnit The delay in seconds of the "delay unit". + * @param delayPerUnit The delay in seconds of the "delay unit". */ void setDelayPerUnit(float delayPerUnit) { _delayPerUnit = delayPerUnit; }; diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 33f64b3b75..373f003e6b 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -97,6 +97,7 @@ public: * @param g Green. * @param b Blue. * @param a Alpha. + * @param depthValue The depth Value. */ virtual void beginWithClear(float r, float g, float b, float a, float depthValue); @@ -129,13 +130,13 @@ public: /** Clears the texture with a specified depth value. * - * @param A specified depth value. + * @param depthValue A specified depth value. */ virtual void clearDepth(float depthValue); /** Clears the texture with a specified stencil value. * - * @param A specified stencil value. + * @param stencilValue A specified stencil value. */ virtual void clearStencil(int stencilValue); @@ -256,7 +257,7 @@ public: /** Sets the Sprite being used. * - * @param A Sprite. + * @param sprite A Sprite. */ inline void setSprite(Sprite* sprite) { CC_SAFE_RETAIN(sprite); diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 855580f1d6..e07ec02b49 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -443,7 +443,7 @@ CC_CONSTRUCTOR_ACCESS: * * @param texture A pointer to an existing Texture2D object. * You can use a Texture2D object for many sprites. - * @return true if the sprite is initialized properly, false otherwise. + * @return True if the sprite is initialized properly, false otherwise. */ virtual bool initWithTexture(Texture2D *texture); @@ -455,7 +455,7 @@ CC_CONSTRUCTOR_ACCESS: * @param texture A pointer to an exisiting Texture2D object. * You can use a Texture2D object for many sprites. * @param rect Only the contents inside rect of this texture will be applied for this sprite. - * @return true if the sprite is initialized properly, false otherwise. + * @return True if the sprite is initialized properly, false otherwise. */ virtual bool initWithTexture(Texture2D *texture, const Rect& rect); @@ -468,15 +468,15 @@ CC_CONSTRUCTOR_ACCESS: * @param texture A Texture2D object whose texture will be applied to this sprite. * @param rect A rectangle assigned the contents of texture. * @param rotated Whether or not the texture rectangle is rotated. - * @return true if the sprite is initialized properly, false otherwise. + * @return True if the sprite is initialized properly, false otherwise. */ virtual bool initWithTexture(Texture2D *texture, const Rect& rect, bool rotated); /** * Initializes a sprite with an SpriteFrame. The texture and rect in SpriteFrame will be applied on this sprite. * - * @param pSpriteFrame A SpriteFrame object. It should includes a valid texture and a rect. - * @return true if the sprite is initialized properly, false otherwise. + * @param spriteFrame A SpriteFrame object. It should includes a valid texture and a rect. + * @return True if the sprite is initialized properly, false otherwise. */ virtual bool initWithSpriteFrame(SpriteFrame *spriteFrame); @@ -487,7 +487,7 @@ CC_CONSTRUCTOR_ACCESS: * If the SpriteFrame doesn't exist it will raise an exception. * * @param spriteFrameName A key string that can fected a volid SpriteFrame from SpriteFrameCache. - * @return true if the sprite is initialized properly, false otherwise. + * @return True if the sprite is initialized properly, false otherwise. */ virtual bool initWithSpriteFrameName(const std::string& spriteFrameName); @@ -499,7 +499,7 @@ CC_CONSTRUCTOR_ACCESS: * After initialization, the rect used will be the size of the image. The offset will be (0,0). * * @param filename The path to an image file in local file system. - * @return true if the sprite is initialized properly, false otherwise. + * @return True if the sprite is initialized properly, false otherwise. * @js init * @lua init */ @@ -514,7 +514,7 @@ CC_CONSTRUCTOR_ACCESS: * * @param filename The path to an image file in local file system. * @param rect The rectangle assigned the content area from texture. - * @return true if the sprite is initialized properly, false otherwise. + * @return True if the sprite is initialized properly, false otherwise. * @js init * @lua init */ diff --git a/cocos/2d/CCTMXLayer.h b/cocos/2d/CCTMXLayer.h index 32a7b3a7b4..2ed28ab51c 100644 --- a/cocos/2d/CCTMXLayer.h +++ b/cocos/2d/CCTMXLayer.h @@ -226,7 +226,7 @@ public: /** Set tileset information for the layer. * - * @param The tileset information for the layer. + * @param info The tileset information for the layer. */ inline void setTileSet(TMXTilesetInfo* info) { CC_SAFE_RETAIN(info); diff --git a/cocos/2d/CCTMXObjectGroup.h b/cocos/2d/CCTMXObjectGroup.h index b77580b85c..5e5fa3e102 100644 --- a/cocos/2d/CCTMXObjectGroup.h +++ b/cocos/2d/CCTMXObjectGroup.h @@ -63,7 +63,7 @@ public: /** Set the group name. * - * @param groupname A string,it is used to set the group name. + * @param groupName A string,it is used to set the group name. */ inline void setGroupName(const std::string& groupName){ _groupName = groupName; } diff --git a/cocos/2d/CCTMXTiledMap.h b/cocos/2d/CCTMXTiledMap.h index 8bb8d858fb..92ba1828de 100644 --- a/cocos/2d/CCTMXTiledMap.h +++ b/cocos/2d/CCTMXTiledMap.h @@ -201,7 +201,7 @@ public: /** Set the tiles's size property measured in pixels. * - * @param The tiles's size property measured in pixels. + * @param tileSize The tiles's size property measured in pixels. */ inline void setTileSize(const Size& tileSize) { _tileSize = tileSize; }; diff --git a/cocos/base/CCNS.h b/cocos/base/CCNS.h index 8272ddb481..cacd940f65 100644 --- a/cocos/base/CCNS.h +++ b/cocos/base/CCNS.h @@ -37,7 +37,7 @@ NS_CC_BEGIN /** * @brief Returns a Core Graphics rectangle structure corresponding to the data in a given string. - * @param pszContent A string object whose contents are of the form "{{x,y},{w, h}}", + * @param str A string object whose contents are of the form "{{x,y},{w, h}}", * where x is the x coordinate, y is the y coordinate, w is the width, and h is the height. * These components can represent integer or float values. * An example of a valid string is "{{3,2},{4,5}}". @@ -49,7 +49,7 @@ Rect CC_DLL RectFromString(const std::string& str); /** * @brief Returns a Core Graphics point structure corresponding to the data in a given string. - * @param pszContent A string object whose contents are of the form "{x,y}", + * @param str A string object whose contents are of the form "{x,y}", * where x is the x coordinate and y is the y coordinate. * The x and y values can represent integer or float values. * An example of a valid string is "{3.0,2.5}". @@ -61,7 +61,7 @@ Vec2 CC_DLL PointFromString(const std::string& str); /** * @brief Returns a Core Graphics size structure corresponding to the data in a given string. - * @param pszContent A string object whose contents are of the form "{w, h}", + * @param str A string object whose contents are of the form "{w, h}", * where w is the width and h is the height. * The w and h values can be integer or float values. * An example of a valid string is "{3.0,2.5}". diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index 88082b823c..292fdcff92 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -90,7 +90,7 @@ THE SOFTWARE. #define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 0 #endif -/** @def CC_DIRECTOR_FPS_INTERVAL +/** @def CC_DIRECTOR_STATS_INTERVAL * Seconds between FPS updates. * 0.5 seconds, means that the FPS number will be updated every 0.5 seconds. * Having a bigger number means a more reliable FPS. @@ -284,7 +284,7 @@ THE SOFTWARE. /** @def CC_CONSTRUCTOR_ACCESS * Indicate the init functions access modifier. If value equals to protected, then these functions are protected. - * If value equals to public, these functions are public + * If value equals to public, these functions are public, * protected by default. */ #ifndef CC_CONSTRUCTOR_ACCESS diff --git a/cocos/platform/CCGLView.h b/cocos/platform/CCGLView.h index 480a9cbb40..826a04740a 100644 --- a/cocos/platform/CCGLView.h +++ b/cocos/platform/CCGLView.h @@ -70,7 +70,10 @@ enum class ResolutionPolicy UNKNOWN, }; -/** @struct GLContextAttrs Have six opengl Context Attrs. */ +/** @struct GLContextAttrs + * + * There are six opengl Context Attrs. + */ struct GLContextAttrs { int redBits;