From 8633fa5d9ed84ddff5f243faa6e74293f07a86d6 Mon Sep 17 00:00:00 2001 From: Walzer Date: Wed, 29 Sep 2010 08:33:52 +0000 Subject: [PATCH] issue #171 --- cocos2dx/include/CCActionManager.h | 2 +- cocos2dx/include/CCTMXTiledMap.h | 1 - cocos2dx/include/CCTMXXMLParser.h | 12 ++++++----- cocos2dx/include/CCTileMapAtlas.h | 2 +- cocos2dx/include/CCTouchDelegateProtocol.h | 25 ++++++++++++++++------ cocos2dx/include/CCTransition.h | 2 +- 6 files changed, 29 insertions(+), 15 deletions(-) diff --git a/cocos2dx/include/CCActionManager.h b/cocos2dx/include/CCActionManager.h index b88234f929..87c55854ff 100644 --- a/cocos2dx/include/CCActionManager.h +++ b/cocos2dx/include/CCActionManager.h @@ -33,6 +33,7 @@ THE SOFTWARE. namespace cocos2d { +struct _hashElement; /** @brief CCActionManager is a singleton that manages all the actions. Normally you won't need to use this singleton directly. 99% of the cases you will use the CCNode interface, @@ -44,7 +45,6 @@ namespace cocos2d { @since v0.8 */ -struct _hashElement; class CCX_DLL CCActionManager : public NSObject, public SelectorProtocol { public: diff --git a/cocos2dx/include/CCTMXTiledMap.h b/cocos2dx/include/CCTMXTiledMap.h index fbc3503e98..fc6a7134e0 100644 --- a/cocos2dx/include/CCTMXTiledMap.h +++ b/cocos2dx/include/CCTMXTiledMap.h @@ -98,7 +98,6 @@ namespace cocos2d { @since v0.8.1 */ - class CCX_DLL CCTMXTiledMap : public CCNode { /** the map's size property measured in tiles */ diff --git a/cocos2dx/include/CCTMXXMLParser.h b/cocos2dx/include/CCTMXXMLParser.h index a84807714c..d378b27a6f 100644 --- a/cocos2dx/include/CCTMXXMLParser.h +++ b/cocos2dx/include/CCTMXXMLParser.h @@ -28,8 +28,10 @@ THE SOFTWARE. #include "CGGeometry.h" #include "Cocos2dDefine.h" namespace cocos2d { + + class CCTMXObjectGroup; - /* + /** @file * Internal TMX parser * * IMPORTANT: These classed should not be documented using doxygen strings @@ -52,7 +54,7 @@ namespace cocos2d { TMXPropertyTile }; - /* @brief CCTMXLayerInfo contains the information about the layers like: + /** @brief CCTMXLayerInfo contains the information about the layers like: - Layer name - Layer size - Layer opacity at creation time (it can be modified at runtime) @@ -78,7 +80,7 @@ namespace cocos2d { virtual ~CCTMXLayerInfo(); }; - /* @brief CCTMXTilesetInfo contains the information about the tilesets like: + /** @brief CCTMXTilesetInfo contains the information about the tilesets like: - Tileset name - Tilset spacing - Tileset margin @@ -105,7 +107,8 @@ namespace cocos2d { virtual ~CCTMXTilesetInfo(); CGRect rectForGID(unsigned int gid); }; - /* @brief CCTMXMapInfo contains the information about the map like: + + /** @brief CCTMXMapInfo contains the information about the map like: - Map orientation (hexagonal, isometric or orthogonal) - Tile size - Map size @@ -118,7 +121,6 @@ namespace cocos2d { This information is obtained from the TMX file. */ - class CCTMXObjectGroup; class CCX_DLL CCTMXMapInfo : public NSObject { public: diff --git a/cocos2dx/include/CCTileMapAtlas.h b/cocos2dx/include/CCTileMapAtlas.h index 7d76e6ef24..8dbe0d6d10 100644 --- a/cocos2dx/include/CCTileMapAtlas.h +++ b/cocos2dx/include/CCTileMapAtlas.h @@ -30,6 +30,7 @@ namespace cocos2d { typedef std::map StringToIntegerDictionary; typedef std::pair StringToIntegerPair; + struct sImageTGA; /** @brief CCTileMapAtlas is a subclass of CCAtlasNode. It knows how to render a map based of tiles. @@ -45,7 +46,6 @@ namespace cocos2d { You SHOULD not use this class. Instead, use the newer TMX file format: CCTMXTiledMap */ - struct sImageTGA; class CCX_DLL CCTileMapAtlas : public CCAtlasNode { /** TileMap info */ diff --git a/cocos2dx/include/CCTouchDelegateProtocol.h b/cocos2dx/include/CCTouchDelegateProtocol.h index 629b3db592..b2384ba20d 100644 --- a/cocos2dx/include/CCTouchDelegateProtocol.h +++ b/cocos2dx/include/CCTouchDelegateProtocol.h @@ -65,8 +65,21 @@ public: virtual void ccTouchesEnded(NSSet *pTouches, UIEvent *pEvent) {} virtual void ccTouchesCancelled(NSSet *pTouches, UIEvent *pEvent) {} }; - -class CCX_DLL CCTargetedTouchDelegate : public CCTouchDelegate +/** + @brief + Using this type of delegate results in two benefits: + - 1. You don't need to deal with NSSets, the dispatcher does the job of splitting + them. You get exactly one UITouch per call. + - 2. You can *claim* a UITouch by returning YES in ccTouchBegan. Updates of claimed + touches are sent only to the delegate(s) that claimed them. So if you get a move/ + ended/cancelled update you're sure it's your touch. This frees you from doing a + lot of checks when doing multi-touch. + + (The name TargetedTouchDelegate relates to updates "targeting" their specific + handler, without bothering the other handlers.) + @since v0.8 + */ + class CCX_DLL CCTargetedTouchDelegate : public CCTouchDelegate { public: CCTargetedTouchDelegate() { m_eTouchDelegateType = ccTouchDelegateTargetedBit; } @@ -81,10 +94,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 + 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/include/CCTransition.h b/cocos2dx/include/CCTransition.h index 48505c3dd7..71454b3deb 100644 --- a/cocos2dx/include/CCTransition.h +++ b/cocos2dx/include/CCTransition.h @@ -415,11 +415,11 @@ public: virtual void onExit(); }; +class CCRenderTexture; /** @brief CCCrossFadeTransition: Cross fades two scenes using the CCRenderTexture object. */ -class CCRenderTexture; class CCX_DLL CCCrossFadeTransition : public CCTransitionScene { public :