diff --git a/cocos2dx/cocoa/NSData.cpp b/cocos2dx/cocoa/NSData.cpp index 08b5822cdf..59b97409b4 100644 --- a/cocos2dx/cocoa/NSData.cpp +++ b/cocos2dx/cocoa/NSData.cpp @@ -78,7 +78,7 @@ void* NSData::bytes(void) return m_pData; } -///@todo implement +//@todo implement NSData* NSData::dataWithBytes(unsigned char *pBytes, int size) { return NULL; diff --git a/cocos2dx/include/CCAtlasNode.h b/cocos2dx/include/CCAtlasNode.h index 41d8e63aef..a512252f0f 100644 --- a/cocos2dx/include/CCAtlasNode.h +++ b/cocos2dx/include/CCAtlasNode.h @@ -45,19 +45,19 @@ class CCX_DLL CCAtlasNode : public CCNode, public CCRGBAProtocol, public CCTextu { protected: - // chars per row + //! chars per row int m_nItemsPerRow; - // chars per column + //! chars per column int m_nItemsPerColumn; - // texture coordinate x increment + //! texture coordinate x increment float m_fTexStepX; - // texture coordinate y increment + //! texture coordinate y increment float m_fTexStepY; - // width of each char + //! width of each char int m_nItemWidth; - // height of each char + //! height of each char int m_nItemHeight; ccColor3B m_tColorUnmodified; @@ -91,10 +91,10 @@ public: // CC Texture protocol - // returns the used texture + /** returns the used texture*/ virtual CCTexture2D* getTexture(void); - // sets a new texture. it will be retained + /** sets a new texture. it will be retained*/ virtual void setTexture(CCTexture2D *texture); private : diff --git a/cocos2dx/include/CCBitmapFontAtlas.h b/cocos2dx/include/CCBitmapFontAtlas.h index f961796ad1..207d5b3638 100644 --- a/cocos2dx/include/CCBitmapFontAtlas.h +++ b/cocos2dx/include/CCBitmapFontAtlas.h @@ -71,15 +71,15 @@ namespace cocos2d{ { // XXX: Creating a public interface so that the bitmapFontArray[] is accesible public://@public - // The characters building up the font + //! The characters building up the font ccBitmapFontDef m_pBitmapFontArray[kCCBitmapFontAtlasMaxChars]; - // FNTConfig: Common Height + //! FNTConfig: Common Height unsigned int m_uCommonHeight; - // Padding + //! Padding ccBitmapFontPadding m_tPadding; - // atlas name + //! atlas name std::string m_sAtlasName; - // values for kerning + //! values for kerning struct _KerningHashElement *m_pKerningDictionary; public: CCBitmapFontConfiguration() diff --git a/cocos2dx/include/CCInstantAction.h b/cocos2dx/include/CCInstantAction.h index 2875c096dd..d7c2193666 100644 --- a/cocos2dx/include/CCInstantAction.h +++ b/cocos2dx/include/CCInstantAction.h @@ -39,7 +39,7 @@ namespace cocos2d { public: CCInstantAction(); virtual ~CCInstantAction(){} - // CCAction method + // CCAction methods virtual NSObject* copyWithZone(NSZone *pZone); virtual bool isDone(void); virtual void step(ccTime dt); @@ -55,7 +55,7 @@ namespace cocos2d { public: CCShow(){} virtual ~CCShow(){} - //super method + //super methods virtual void startWithTarget(CCNode *pTarget); virtual CCFiniteTimeAction * reverse(void); public: @@ -71,7 +71,7 @@ namespace cocos2d { public: CCHide(){} virtual ~CCHide(){} - //super method + //super methods virtual void startWithTarget(CCNode *pTarget); virtual CCFiniteTimeAction * reverse(void); public: @@ -105,7 +105,7 @@ namespace cocos2d { static CCFlipX * actionWithFlipX(bool x); bool initWithFlipX(bool x); - //super method + //super methods virtual void startWithTarget(CCNode *pTarget); virtual CCFiniteTimeAction * reverse(void); virtual NSObject* copyWithZone(NSZone *pZone); @@ -126,7 +126,7 @@ namespace cocos2d { static CCFlipY * actionWithFlipY(bool y); bool initWithFlipY(bool y); - //super method + //super methods virtual void startWithTarget(CCNode *pTarget); virtual CCFiniteTimeAction * reverse(void); virtual NSObject* copyWithZone(NSZone *pZone); @@ -146,7 +146,7 @@ namespace cocos2d { static CCPlace * actionWithPosition(CGPoint pos); /** Initializes a Place action with a position */ bool initWithPosition(CGPoint pos); - //super method + //super methods virtual void startWithTarget(CCNode *pTarget); virtual NSObject* copyWithZone(NSZone *pZone); protected: @@ -172,7 +172,7 @@ namespace cocos2d { virtual bool initWithTarget(SelectorProtocol* pSelectorTarget); /** exeuctes the callback */ virtual void execute(); - //super method + //super methods virtual void startWithTarget(CCNode *pTarget); NSObject * copyWithZone(cocos2d::NSZone *pZone); @@ -197,7 +197,7 @@ namespace cocos2d { virtual ~CCCallFuncN(){} static CCCallFuncN * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector); virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector); - // super method + // super methods virtual NSObject* copyWithZone(NSZone *pZone); virtual void execute(); }; @@ -215,7 +215,7 @@ namespace cocos2d { static CCCallFuncND * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d); /** initializes the action with the callback and the data to pass as an argument */ virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d); - // super method + // super methods virtual NSObject* copyWithZone(NSZone *pZone); virtual void execute(); @@ -227,9 +227,9 @@ namespace cocos2d { #if NS_BLOCKS_AVAILABLE - /** Executes a callback using a block - */ - @interface CCCallBlock : CCInstantAction + /** Executes a callback using a block + */ + @interface CCCallBlock : CCInstantAction { void (^block_)(); } @@ -244,7 +244,7 @@ namespace cocos2d { -(void) execute; @end - @class CCNode; + @class CCNode; /** Executes a callback using a block with a single CCNode parameter */ diff --git a/cocos2dx/include/CCNode.h b/cocos2dx/include/CCNode.h index bba4b5b709..ba5229f108 100644 --- a/cocos2dx/include/CCNode.h +++ b/cocos2dx/include/CCNode.h @@ -209,13 +209,13 @@ protected: private: - // lazy allocs + //! lazy allocs void childrenAlloc(void); - // helper that reorder a child + //! helper that reorder a child void insertChild(CCNode* child, int z); - // used internally to alter the zOrder variable. DON'T call this method manually + //! used internally to alter the zOrder variable. DON'T call this method manually void setZOrder(int z); void detachChild(CCNode *child, bool doCleanup); diff --git a/cocos2dx/include/CCPVRTexture.h b/cocos2dx/include/CCPVRTexture.h index 168ab47c33..c17e4f414d 100644 --- a/cocos2dx/include/CCPVRTexture.h +++ b/cocos2dx/include/CCPVRTexture.h @@ -48,9 +48,9 @@ public: virtual ~CCPVRTexture(); CCPVRTexture * initWithContentsOfFile(const char* path); -/// @todo CCPVRTexture * initWithContentsOfURL(NSURL *url); +// @todo CCPVRTexture * initWithContentsOfURL(NSURL *url); static CCPVRTexture * pvrTextureWithContentsOfFile(const char* path); -/// @todo static CCPVRTexture * pvrTextureWithContentsOfURL(NSURL *url); +// @todo static CCPVRTexture * pvrTextureWithContentsOfURL(NSURL *url); CCX_PROPERTY_READONLY(GLuint, m_uName, Name) CCX_PROPERTY_READONLY(unsigned int, m_uWidth, Width) diff --git a/cocos2dx/include/CCParticleSystem.h b/cocos2dx/include/CCParticleSystem.h index 16728688f6..48bf91c9e4 100644 --- a/cocos2dx/include/CCParticleSystem.h +++ b/cocos2dx/include/CCParticleSystem.h @@ -95,14 +95,14 @@ namespace cocos2d { ccTime timeToLive; - // Mode A: gravity, direction, radial accel, tangential accel + //! Mode A: gravity, direction, radial accel, tangential accel struct { CGPoint dir; float radialAccel; float tangentialAccel; } modeA; - // Mode B: radius mode + //! Mode B: radius mode struct { float angle; float degreesPerSecond; @@ -163,54 +163,54 @@ namespace cocos2d { { protected: std::string m_sPlistFile; - // time elapsed since the start of the system (in seconds) + //! time elapsed since the start of the system (in seconds) float m_fElapsed; // Different modes - // Mode A:Gravity + Tangential Accel + Radial Accel + //! Mode A:Gravity + Tangential Accel + Radial Accel struct { - // gravity of the particles + /** Gravity value. Only available in 'Gravity' mode. */ CGPoint gravity; - // The speed the particles will have. + /** speed of each particle. Only available in 'Gravity' mode. */ float speed; - // The speed variance + /** speed variance of each particle. Only available in 'Gravity' mode. */ float speedVar; - // Tangential acceleration + /** tangential acceleration of each particle. Only available in 'Gravity' mode. */ float tangentialAccel; - // Tangential acceleration variance + /** tangential acceleration variance of each particle. Only available in 'Gravity' mode. */ float tangentialAccelVar; - // Radial acceleration + /** radial acceleration of each particle. Only available in 'Gravity' mode. */ float radialAccel; - // Radial acceleration variance + /** radial acceleration variance of each particle. Only available in 'Gravity' mode. */ float radialAccelVar; } modeA; - // Mode B: circular movement (gravity, radial accel and tangential accel don't are not used in this mode) + //! Mode B: circular movement (gravity, radial accel and tangential accel don't are not used in this mode) struct { - // The starting radius of the particles + /** The starting radius of the particles. Only available in 'Radius' mode. */ float startRadius; - // The starting radius variance of the particles + /** The starting radius variance of the particles. Only available in 'Radius' mode. */ float startRadiusVar; - // The ending radius of the particles + /** The ending radius of the particles. Only available in 'Radius' mode. */ float endRadius; - // The ending radius variance of the particles + /** The ending radius variance of the particles. Only available in 'Radius' mode. */ float endRadiusVar; - // Number of degress to rotate a particle around the source pos per second + /** Number of degress to rotate a particle around the source pos per second. Only available in 'Radius' mode. */ float rotatePerSecond; - // Variance in degrees for rotatePerSecond + /** Variance in degrees for rotatePerSecond. Only available in 'Radius' mode. */ float rotatePerSecondVar; } modeB; - // Array of particles + //! Array of particles tCCParticle *m_pParticles; // color modulate // BOOL colorModulate; - // How many particles can be emitted per second + //! How many particles can be emitted per second float m_fEmitCounter; - // particle idx + //! particle idx int m_nParticleIdx; // Optimization @@ -244,44 +244,31 @@ namespace cocos2d { ////////////////////////////////////////////////////////////////////////// public: // mode A - /** Gravity value. Only available in 'Gravity' mode. */ virtual CGPoint getGravity(); virtual void setGravity(CGPoint g); - /** speed of each particle. Only available in 'Gravity' mode. */ virtual float getSpeed(); virtual void setSpeed(float speed); - /** speed variance of each particle. Only available in 'Gravity' mode. */ virtual float getSpeedVar(); virtual void setSpeedVar(float speed); - /** tangential acceleration of each particle. Only available in 'Gravity' mode. */ virtual float getTangentialAccel(); virtual void setTangentialAccel(float t); - /** tangential acceleration variance of each particle. Only available in 'Gravity' mode. */ virtual float getTangentialAccelVar(); virtual void setTangentialAccelVar(float t); - /** radial acceleration of each particle. Only available in 'Gravity' mode. */ virtual float getRadialAccel(); virtual void setRadialAccel(float t); - /** radial acceleration variance of each particle. Only available in 'Gravity' mode. */ virtual float getRadialAccelVar(); virtual void setRadialAccelVar(float t); // mode B - /** The starting radius of the particles. Only available in 'Radius' mode. */ virtual float getStartRadius(); virtual void setStartRadius(float startRadius); - /** The starting radius variance of the particles. Only available in 'Radius' mode. */ virtual float getStartRadiusVar(); virtual void setStartRadiusVar(float startRadiusVar); - /** The ending radius of the particles. Only available in 'Radius' mode. */ virtual float getEndRadius(); virtual void setEndRadius(float endRadius); - /** The ending radius variance of the particles. Only available in 'Radius' mode. */ virtual float getEndRadiusVar(); virtual void setEndRadiusVar(float endRadiusVar); - /** Number of degress to rotate a particle around the source pos per second. Only available in 'Radius' mode. */ virtual float getRotatePerSecond(); virtual void setRotatePerSecond(float degrees); - /** Variance in degrees for rotatePerSecond. Only available in 'Radius' mode. */ virtual float getRotatePerSecondVar(); virtual void setRotatePerSecondVar(float degrees); ////////////////////////////////////////////////////////////////////////// diff --git a/cocos2dx/include/CCPointParticleSystem.h b/cocos2dx/include/CCPointParticleSystem.h index 8866299a2f..d74f571d4b 100644 --- a/cocos2dx/include/CCPointParticleSystem.h +++ b/cocos2dx/include/CCPointParticleSystem.h @@ -61,9 +61,9 @@ namespace cocos2d { virtual void setStartSize(float var); virtual void setEndSize(float var); protected: - // Array of (x,y,size) + //! Array of (x,y,size) ccPointSprite *m_pVertices; - // vertices buffer id + //! vertices buffer id GLuint m_uVerticesID; }; diff --git a/cocos2dx/include/CCQuadParticleSystem.h b/cocos2dx/include/CCQuadParticleSystem.h index 36a0d6eecd..277c3ce75a 100644 --- a/cocos2dx/include/CCQuadParticleSystem.h +++ b/cocos2dx/include/CCQuadParticleSystem.h @@ -55,10 +55,10 @@ namespace cocos2d { ,m_pIndices(NULL) {} virtual ~CCQuadParticleSystem(); - // initialices the indices for the vertices + /** initialices the indices for the vertices*/ void initIndices(); - // initilizes the text coords + /** initilizes the text coords*/ void initTexCoordsWithRect(CGRect rect); /** Sets a new CCSpriteFrame as particle. diff --git a/cocos2dx/include/CCRadialTransition.h b/cocos2dx/include/CCRadialTransition.h index 1bdb042d36..ff6cd52165 100644 --- a/cocos2dx/include/CCRadialTransition.h +++ b/cocos2dx/include/CCRadialTransition.h @@ -29,9 +29,9 @@ THE SOFTWARE. namespace cocos2d { -/// -// @brief A counter colock-wise radial transition to the next scene -/// +/** + @brief A counter colock-wise radial transition to the next scene + */ class CCX_DLL CCRadialCCWTransition : public CCTransitionScene { public: @@ -48,9 +48,9 @@ protected: virtual CCProgressTimerType radialType(); }; -/// -// @brief A counter colock-wise radial transition to the next scene -/// +/** + @brief A counter colock-wise radial transition to the next scene + */ class CCX_DLL CCRadialCWTransition : public CCRadialCCWTransition { public: diff --git a/cocos2dx/include/CCTMXLayer.h b/cocos2dx/include/CCTMXLayer.h index a489e2acb1..cddc75aea2 100644 --- a/cocos2dx/include/CCTMXLayer.h +++ b/cocos2dx/include/CCTMXLayer.h @@ -149,20 +149,20 @@ namespace cocos2d { unsigned int atlasIndexForExistantZ(unsigned int z); unsigned int atlasIndexForNewZ(int z); protected: - // name of the layer + //! name of the layer std::string m_sLayerName; - // TMX Layer supports opacity + //! TMX Layer supports opacity unsigned char m_cOpacity; unsigned int m_uMinGID; unsigned int m_uMaxGID; - // Only used when vertexZ is used + //! Only used when vertexZ is used int m_nVertexZvalue; bool m_bUseAutomaticVertexZ; float m_fAlphaFuncValue; - // used for optimization + //! used for optimization CCSprite *m_pReusedTile; _ccCArray *m_pAtlasIndexArray; }; diff --git a/cocos2dx/include/CCTMXTiledMap.h b/cocos2dx/include/CCTMXTiledMap.h index b9b92d5200..fbc3503e98 100644 --- a/cocos2dx/include/CCTMXTiledMap.h +++ b/cocos2dx/include/CCTMXTiledMap.h @@ -143,7 +143,7 @@ namespace cocos2d { CCTMXTilesetInfo * tilesetForLayer(CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo); protected: - // tile properties + //! tile properties NSDictionary *m_pTileProperties; }; diff --git a/cocos2dx/include/CCTMXXMLParser.h b/cocos2dx/include/CCTMXXMLParser.h index 2f6a21d04d..a84807714c 100644 --- a/cocos2dx/include/CCTMXXMLParser.h +++ b/cocos2dx/include/CCTMXXMLParser.h @@ -96,9 +96,9 @@ namespace cocos2d { CGSize m_tTileSize; unsigned int m_uSpacing; unsigned int m_uMargin; - // filename containing the tiles (should be spritesheet / texture atlas) + //! filename containing the tiles (should be spritesheet / texture atlas) std::string m_sSourceImage; - // size in pixels of the image + //! size in pixels of the image CGSize m_tImageSize; public: CCTMXTilesetInfo(); @@ -163,11 +163,11 @@ namespace cocos2d { inline void setTMXFileName(const char *fileName){ m_sTMXFileName = fileName; } protected: - // tmx filename + //! tmx filename std::string m_sTMXFileName; - // current string + //! current string std::string m_sCurrentString; - // tile properties + //! tile properties NSDictionary* m_pTileProperties; }; diff --git a/cocos2dx/include/CCTileMapAtlas.h b/cocos2dx/include/CCTileMapAtlas.h index abaefa94c9..7d76e6ef24 100644 --- a/cocos2dx/include/CCTileMapAtlas.h +++ b/cocos2dx/include/CCTileMapAtlas.h @@ -78,9 +78,9 @@ namespace cocos2d { void updateAtlasValues(); protected: - // x,y to altas dicctionary + //! x,y to altas dicctionary StringToIntegerDictionary *m_pPosToAtlasIndex; - // numbers of tiles to render + //! numbers of tiles to render int m_nItemsToRender; }; diff --git a/cocos2dx/include/CCTouchDelegateProtocol.h b/cocos2dx/include/CCTouchDelegateProtocol.h index 01ec0024e3..629b3db592 100644 --- a/cocos2dx/include/CCTouchDelegateProtocol.h +++ b/cocos2dx/include/CCTouchDelegateProtocol.h @@ -47,9 +47,9 @@ protected: public: inline ccTouchDelegateFlag getTouchDelegateType(void) { return m_eTouchDelegateType; } - // call the release() in child(layer or menu) + //! call the release() in child(layer or menu) virtual void destroy(void) {} - // call the retain() in child (layer or menu) + //! call the retain() in child (layer or menu) virtual void keep(void) {} virtual bool ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent) { return false;}; @@ -70,8 +70,9 @@ class CCX_DLL CCTargetedTouchDelegate : public CCTouchDelegate { public: CCTargetedTouchDelegate() { m_eTouchDelegateType = ccTouchDelegateTargetedBit; } - // Return YES to claim the touch. - // @since v0 + /** Return YES to claim the touch. + @since v0 + */ virtual bool ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent) { return false;}; // optional @@ -80,9 +81,10 @@ class CCX_DLL CCTargetedTouchDelegate : public CCTouchDelegate virtual void ccTouchCancelled(CCTouch *pTouch, UIEvent *pEvent) {} }; - // @brief CCStandardTouchDelegate. - // This type of delegate is the same one used by CocoaTouch. You will receive all the events (Began,Moved,Ended,Cancelled). - // @since v0.8 + /** @brief CCStandardTouchDelegate. + This type of delegate is the same one used by CocoaTouch. You will receive all the events (Began,Moved,Ended,Cancelled). + @since v0.8 + */ class CCX_DLL CCStandardTouchDelegate : public CCTouchDelegate { public: diff --git a/cocos2dx/platform/uphone/CCXFileUtils_uphone.h b/cocos2dx/platform/uphone/CCXFileUtils_uphone.h index cf896a4162..6f816e795b 100644 --- a/cocos2dx/platform/uphone/CCXFileUtils_uphone.h +++ b/cocos2dx/platform/uphone/CCXFileUtils_uphone.h @@ -52,7 +52,7 @@ public: /** @brief Generate a NSDictionary pointer by file - @param pFileName The file name + @param pFileName The file name of *.plist file @return The NSDictionary pointer generated from the file */ static NSDictionary *dictionaryWithContentsOfFile(const char *pFileName);