diff --git a/cocos2dx/CCConfiguration.h b/cocos2dx/CCConfiguration.h index ce97119d53..df311500c6 100644 --- a/cocos2dx/CCConfiguration.h +++ b/cocos2dx/CCConfiguration.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCCONFIGURATION_H__ #define __CCCONFIGURATION_H__ -#include "cocoa/NSObject.h" +#include "NSObject.h" #include #include namespace cocos2d { diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp index 120c64c41f..fdf4ec29c2 100644 --- a/cocos2dx/CCDirector.cpp +++ b/cocos2dx/CCDirector.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "CCDirector.h" #include "CCScene.h" -#include "cocoa/NSMutableArray.h" +#include "NSMutableArray.h" #include "CCScheduler.h" #include "ccMacros.h" #include "Cocos2dDefine.h" @@ -35,7 +35,7 @@ THE SOFTWARE. #include "CCTextureCache.h" #include "CCTransition.h" #include "CCSpriteFrameCache.h" -#include "cocoa/NSAutoreleasePool.h" +#include "NSAutoreleasePool.h" #include "platform/platform.h" #include diff --git a/cocos2dx/CCDirector.h b/cocos2dx/CCDirector.h index 18062d148b..1891c29ada 100644 --- a/cocos2dx/CCDirector.h +++ b/cocos2dx/CCDirector.h @@ -28,10 +28,10 @@ THE SOFTWARE. #include "ccConfig.h" #include "ccTypes.h" #include "Cocos2dDefine.h" -#include "cocoa/NSObject.h" -#include "cocoa/CGGeometry.h" -#include "cocoa/NSMutableArray.h" -#include "cocoa/CGGeometry.h" +#include "NSObject.h" +#include "CGGeometry.h" +#include "NSMutableArray.h" +#include "CGGeometry.h" #include "CCXEGLView.h" #include "ccxCommon.h" diff --git a/cocos2dx/CCDrawingPrimitives.h b/cocos2dx/CCDrawingPrimitives.h index 6050cd1034..62b2f9cf44 100644 --- a/cocos2dx/CCDrawingPrimitives.h +++ b/cocos2dx/CCDrawingPrimitives.h @@ -40,7 +40,7 @@ THE SOFTWARE. @warning These functions draws the Line, Point, Polygon, immediately. They aren't batched. If you are going to make a game that depends on these primitives, I suggest creating a batch. */ -#include "Cocoa/CGGeometry.h" // for CGPoint +#include "CGGeometry.h" // for CGPoint namespace cocos2d { /** draws a point given x and y coordinate */ diff --git a/cocos2dx/CCScheduler.cpp b/cocos2dx/CCScheduler.cpp index 5e4da4e8f5..c70f6b1111 100644 --- a/cocos2dx/CCScheduler.cpp +++ b/cocos2dx/CCScheduler.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "CCScheduler.h" #include "ccMacros.h" #include "support/data_support/utlist.h" -#include "cocoa/NSMutableArray.h" +#include "NSMutableArray.h" #include namespace cocos2d { diff --git a/cocos2dx/CCScheduler.h b/cocos2dx/CCScheduler.h index f8c8f4c9eb..323fb13a1e 100644 --- a/cocos2dx/CCScheduler.h +++ b/cocos2dx/CCScheduler.h @@ -25,8 +25,8 @@ THE SOFTWARE. #ifndef __CCSCHEDULER_H__ #define __CCSCHEDULER_H__ -#include "cocoa/NSObject.h" -#include "cocoa/selector_protocol.h" +#include "NSObject.h" +#include "selector_protocol.h" #include "support/data_support/uthash.h" namespace cocos2d { diff --git a/cocos2dx/cocoa/CGAffineTransform.h b/cocos2dx/cocoa/CGAffineTransform.h deleted file mode 100644 index 668726ca16..0000000000 --- a/cocos2dx/cocoa/CGAffineTransform.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __COCOA_CGAFFINETRANSFORM_H__ -#define __COCOA_CGAFFINETRANSFORM_H__ - -#include "CGGeometry.h" -namespace cocos2d { - -struct CGAffineTransform { - CGFloat a, b, c, d; - CGFloat tx, ty; -}; - - -inline CGAffineTransform __CGAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty); -#define CGAffineTransformMake __CGAffineTransformMake - -inline CGPoint __CGPointApplyAffineTransform(CGPoint point, CGAffineTransform t); -#define CGPointApplyAffineTransform __CGPointApplyAffineTransform - -inline CGSize __CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t); -#define CGSizeApplyAffineTransform __CGSizeApplyAffineTransform - -CGAffineTransform CGAffineTransformMakeIdentity(); -CGRect CGRectApplyAffineTransform(CGRect rect, CGAffineTransform anAffineTransform); - -CGAffineTransform CGAffineTransformTranslate(CGAffineTransform t, float tx, float ty); -CGAffineTransform CGAffineTransformRotate(CGAffineTransform aTransform, CGFloat anAngle); -CGAffineTransform CGAffineTransformScale(CGAffineTransform t, CGFloat sx, CGFloat sy); -CGAffineTransform CGAffineTransformConcat(CGAffineTransform t1,CGAffineTransform t2); -bool CGAffineTransformEqualToTransform(CGAffineTransform t1,CGAffineTransform t2); -CGAffineTransform CGAffineTransformInvert(CGAffineTransform t); - -extern const CGAffineTransform CGAffineTransformIdentity; -}//namespace cocos2d - -#endif // __COCOA_CGAFFINETRANSFORM_H__ diff --git a/cocos2dx/cocoa/CGGeometry.h b/cocos2dx/cocoa/CGGeometry.h deleted file mode 100644 index 469d585125..0000000000 --- a/cocos2dx/cocoa/CGGeometry.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __COCOS_CGGEMETRY_H__ -#define __COCOS_CGGEMETRY_H__ - -#include "ccxCommon.h" -namespace cocos2d { - -typedef float CGFloat; - -class CCX_DLL CGPoint -{ -public: - float x; - float y; - -public: - - CGPoint(); - CGPoint(float x, float y); - -public: - static bool CGPointEqualToPoint(CGPoint point1, CGPoint point2); -}; - -class CCX_DLL CGSize -{ -public: - float width; - float height; - -public: - CGSize(); - CGSize(float width, float height); - -public: - static bool CGSizeEqualToSize(CGSize size1, CGSize size2); -}; - -class CCX_DLL CGRect -{ -public: - CGPoint origin; - CGSize size; - -public: - CGRect(); - CGRect(float x, float y, float width, float height); - -public: - // return the leftmost x-value of 'rect' - static CGFloat CGRectGetMinX(CGRect rect); - - // return the rightmost x-value of 'rect' - static CGFloat CGRectGetMaxX(CGRect rect); - - // return the midpoint x-value of 'rect' - static CGFloat CGRectGetMidX(CGRect rect); - - // Return the bottommost y-value of `rect' - static CGFloat CGRectGetMinY(CGRect rect); - - // Return the topmost y-value of `rect' - static CGFloat CGRectGetMaxY(CGRect rect); - - // Return the midpoint y-value of `rect' - static CGFloat CGRectGetMidY(CGRect rect); - - static bool CGRectEqualToRect(CGRect rect1, CGRect rect2); - - static bool CGRectContainsPoint(CGRect rect, CGPoint point); -}; - -#define CGPointMake(x, y) CGPoint((x), (y)) -#define CGSizeMake(width, height) CGSize((width), (height)) -#define CGRectMake(x, y, width, height) CGRect((x), (y), (width), (height)) - - -const CGPoint CGPointZero = CGPointMake(0,0); - -/* The "zero" size -- equivalent to CGSizeMake(0, 0). */ -const CGSize CGSizeZero = CGSizeMake(0,0); - -/* The "zero" rectangle -- equivalent to CGRectMake(0, 0, 0, 0). */ -const CGRect CGRectZero = CGRectMake(0,0,0,0); - -}//namespace cocos2d - -#endif // __COCOS_CGGEMETRY_H__ diff --git a/cocos2dx/cocoa/NSAutoreleasePool.h b/cocos2dx/cocoa/NSAutoreleasePool.h deleted file mode 100644 index 9ab9bd343b..0000000000 --- a/cocos2dx/cocoa/NSAutoreleasePool.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __NS_AUTO_RELEASE_POOL_H__ -#define __NS_AUTO_RELEASE_POOL_H__ - -#include "NSObject.h" -#include "NSMutablearray.h" - -#include -namespace cocos2d { - -class NSAutoreleasePool -{ -public: - NSAutoreleasePool(void); - ~NSAutoreleasePool(void); - - void addObject(NSObject *pObject); - void removeObject(NSObject *pObject); - - void clear(void); -private: - NSMutableArray *m_pManagedObjectArray; -}; - -class NSPoolManager -{ -public: - ~NSPoolManager(); - - void finalize(void); - void push(void); - void pop(void); - - void removeObject(NSObject *pObject); - void addObject(NSObject *pObject); - -public: - static NSPoolManager* getInstance(); - -private: - NSPoolManager(); - NSAutoreleasePool* getCurReleasePool(); - -private: - static NSPoolManager *m_pPoolManager; - -private: - std::stack *m_pReleasePoolStack; - NSAutoreleasePool *m_pCurReleasePool; -}; -}//namespace cocos2d - -#endif //__NS_AUTO_RELEASE_POOL_H__ diff --git a/cocos2dx/cocoa/NSData.h b/cocos2dx/cocoa/NSData.h deleted file mode 100644 index 6591f38a6b..0000000000 --- a/cocos2dx/cocoa/NSData.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __NSDATA_H__ -#define __NSDATA_H__ - -#include "NSObject.h" -#include -#include "platform/platform.h" -namespace cocos2d { - -class NSData : public NSObject -{ -public: - NSData(void); - ~NSData(void); - - void* bytes(void); - -public: - static NSData* dataWithBytes(UINT8 *pBytes, int size); - static NSData* dataWithContentsOfFile(const std::string &strPath); - -private: - char *m_pData; -}; -}//namespace cocos2d - -#endif //__NSDATA_H__ diff --git a/cocos2dx/cocoa/NSMutableArray.h b/cocos2dx/cocoa/NSMutableArray.h deleted file mode 100644 index c2d44c15ca..0000000000 --- a/cocos2dx/cocoa/NSMutableArray.h +++ /dev/null @@ -1,315 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __COCOA_NS_MUTATLE_ARRAY_H__ -#define __COCOA_NS_MUTATLE_ARRAY_H__ - -#include "cocoa/NSObject.h" -#include -#include - -namespace cocos2d { - -// the element should be pointer of NSObject or it's sub class -template -class NSMutableArray : public NSObject -{ -public: - typedef std::vector NSObjectArray; - typedef typename NSObjectArray::iterator NSMutableArrayIterator; - typedef typename NSObjectArray::reverse_iterator NSMutableArrayRevIterator; - -public: - NSMutableArray(unsigned int uSize = 0) - { - m_array.resize(uSize); - } - - ~NSMutableArray(void) - { - removeAllObjects(); - } - - unsigned int count(void) - { - return m_array.size(); - } - - unsigned int getIndexOfObject(T pObject) - { - if (m_array.empty() || (pObject == NULL)) - { - return 0; - } - - NSMutableArray::NSMutableArrayIterator iter; - unsigned int uRet = 0; - int i; - for (iter = m_array.begin(), i = 0; iter != m_array.end(); ++iter, ++i) - { - if (*iter == pObject) - { - uRet = i; - break; - } - } - - return uRet; - } - - bool containsObject(T pObject) - { - if (m_array.empty() || (! pObject)) - { - return false; - } - - bool bRet = false; - NSMutableArray::NSMutableArrayIterator iter; - for (iter = m_array.begin(); iter != m_array.end(); ++iter) - { - if (*iter == pObject) - { - bRet = true; - break; - } - } - - return bRet; - } - - T getLastObject(void) - { - T pObject = NULL; - int count = this->count(); - - if (count > 0) - { - pObject = m_array[count - 1]; - } - - return pObject; - } - - T getObjectAtIndex(unsigned int uIndex) - { - assert(uIndex < count()); - - if (uIndex >= count()) - { - return NULL; - } - - return m_array[uIndex]; - } - - // Adding objects - void addObject(T pObject) - { - // make sure the pointer is not null - if (pObject == NULL) - { - return; - } - - // add the refrence - pObject->retain(); - - // the array is full, push back - m_array.push_back(pObject); - } - - void addObjectsFromArray(NSMutableArray *pArray) - { - if (pArray && pArray->count() > 0) - { - NSMutableArray::NSMutableArrayIterator iter; - for (iter = pArray->begin(); iter != pArray->end(); ++iter) - { - if (*iter) - { - m_array.push_back(*iter); - } - } - } - } - - void insertObjectAtIndex(T pObject, unsigned int uIndex) - { - // make sure the object is not null - if (pObject == NULL) - { - return; - } - - // add the refrence of the object - pObject->retain(); - - // insert the object - m_array.insert(m_array.begin() + uIndex, pObject); - } - - // Removing objects - void removeLastObject(void) - { - int count = this->count(); - - if (count > 0) - { - removeObjectAtIndex(count - 1); - } - } - - void removeObject(T pObject) - { - if (m_array.empty() || (! pObject)) - { - return; - } - - NSMutableArray::NSMutableArrayIterator iter; - int i; - for (iter = m_array.begin(), i = 0; iter != m_array.end(); ++iter, ++i) - { - if (*iter == pObject) - { - m_array.erase(iter); - - pObject->release(); - - break; - } - } - } - - void removeObjectAtIndex(unsigned int uIndex) - { - if (m_array.empty() || uIndex == 0) - { - return; - } - - T pObject = m_array.at(uIndex); - if (pObject) - { - pObject->release(); - } - - m_array.erase(m_array.begin() + uIndex); - } - - void removeAllObjects(void) - { - NSMutableArray::NSMutableArrayIterator iter; - for (iter = m_array.begin(); iter != m_array.end(); ++iter) - { - if (*iter) - { - (*iter)->release(); - } - } - - m_array.clear(); - } - - void replaceObjectAtIndex(unsigned int uIndex, T pObject) - { - if (uIndex >= count()) - { - // index out of range - assert(0); - return; - } - - // release the object - T pTmp = m_array[uIndex]; - if (pTmp) - { - pTmp->release(); - } - - m_array[uIndex] = pObject; - - // add the ref - if (pObject) - { - pObject->retain(); - } - } - - NSMutableArrayIterator begin(void) - { - return m_array.begin(); - } - - NSMutableArrayIterator end(void) - { - return m_array.end(); - } - -public: - static NSMutableArray* arrayWithObjects(T pObject1, ...) - { - NSMutableArray *pArray = new NSMutableArray(); - - va_list params; - va_start(params, pObject1); - - T pFirst = pObject1; - while (pFirst) - { - pArray->addObject(pFirst); - pFirst = va_arg(params, T); - } - - va_end(params); - - return pArray; - } - - static NSMutableArray* arrayWithArray(NSMutableArray *pArray) - { - if (pArray == NULL) - { - return NULL; - } - - NSMutableArray *pNewArray = new NSMutableArray(); - NSMutableArray::NSMutableArrayIterator iter; - for (iter = pArray->begin(); iter != pArray->end(); ++iter) - { - pNewArray->addObject(*iter); - } - - return pNewArray; - } - -private: - std::vector m_array; -}; - -#define NSArray NSMutableArray -}//namespace cocos2d - -#endif // __COCOA_NS_MUTATLE_ARRAY_H__ diff --git a/cocos2dx/cocoa/NSMutableDictionary.h b/cocos2dx/cocoa/NSMutableDictionary.h deleted file mode 100644 index da79149dfc..0000000000 --- a/cocos2dx/cocoa/NSMutableDictionary.h +++ /dev/null @@ -1,206 +0,0 @@ -/* cocos2d for windows - * - * http://cocos2d-win.blogspot.com - * - * Copyright (C) 2010 KOO C.H - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the 'cocos2d for windows' license. - * - * You will find a copy of this license within the cocos2d for windows - * distribution inside the "LICENSE" file. - * - */ -#ifndef __CCMUTABLE_DICTIONARY_H__ -#define __CCMUTABLE_DICTIONARY_H__ - -#include -#include -#include "NSObject.h" -#include "NSMutableArray.h" - -using namespace std; -namespace cocos2d { - -template -class NSMutableDictionary : public NSObject -{ -public: - typedef std::map<_T, _ValueT> NSObjectMap; - typedef typename NSObjectMap::iterator NSObjectMapIter; - -protected: - typedef pair<_T, _ValueT> Int_Pair; - NSObjectMap m_Map; - bool m_bBegin; - NSObjectMapIter m_MapIter; - -public: - NSMutableDictionary(void) - { - m_bBegin = false; - } - - ~NSMutableDictionary(void) - { - removeAllObjects(); - } - - /// return the number of items - unsigned int count() - { - return m_Map.size(); - } - - /// return all the keys - std::vector allKeys() - { - std::vector tRet; - NSObjectMapIter it; - for( it = m_Map.begin(); it != m_Map.end(); ++it) - { - tRet.push_back(it->first); - } - return tRet; - } - - /** @warning : We use '==' to compare two objects*/ - std::vector allKeysForObject(_ValueT object) - { - std::vector tRet; - NSObjectMapIter it; - for( it= m_Map.begin(); it != m_Map.end(); ++it) - { - if (it->second == object) - { - tRet.push_back(it->first); - } - } - return tRet; - } - - _ValueT objectForKey(_T key) ///< - { - NSObjectMapIter it; - - it = m_Map.find(key); - - if(it == m_Map.end()) //no match case - return NULL; - - return it->second; - } - - - bool setObject(_ValueT pObject, _T key) - { - pair pr; - - pr = m_Map.insert( Int_Pair(key, pObject) ); - - if(pr.second == true) - { - pObject->retain(); - return true; - } - - return false; - } - - void removeObjectForKey(_T key) - { - NSObjectMapIter it; - - it = m_Map.find(key); - - if(it == m_Map.end()) //no match case - return; - - if(it->second ) - { - it->second->release() ; - m_Map.erase(it); - } - } - - bool begin() - { - if(m_Map.size() == 0) - return false; - - m_MapIter = m_Map.begin(); - m_bBegin = true; - - return true; - } - - _ValueT next(_T* key = NULL) - { - if(!m_bBegin) - return NULL; - - _ValueT pObject = m_MapIter->second; - - if(m_MapIter == m_Map.end()) - { - m_bBegin = false; - } - else - { - if(key) - { - *key = m_MapIter->first; - } - - m_MapIter++; - - if(m_MapIter == m_Map.end()) - { - m_bBegin = false; - } - } - - return pObject; - } - - void end() - { - m_bBegin = false; - } - - void removeAllObjects() - { - NSObjectMapIter it; - for( it= m_Map.begin(); it != m_Map.end(); ++it) - { - it->second->release(); - } - - m_Map.clear(); - } - - static NSMutableDictionary<_T, _ValueT>* dictionaryWithDictionary(NSMutableDictionary<_T, _ValueT>* srcDict) - { - NSMutableDictionary<_T, _ValueT>* pNewDict = new NSMutableDictionary<_T, _ValueT>(); - - srcDict->begin(); - - _T key; - _ValueT value; - - while( (value = srcDict->next(&key)) ) - { - pNewDict->setObject(value, key); - } - - srcDict->end(); - - return pNewDict; - } -}; - -#define NSDictionary NSMutableDictionary -}//namespace cocos2d - - -#endif //__CCMUTABLE_DICTIONARY_H__ \ No newline at end of file diff --git a/cocos2dx/cocoa/NSObject.h b/cocos2dx/cocoa/NSObject.h deleted file mode 100644 index 3442a17291..0000000000 --- a/cocos2dx/cocoa/NSObject.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __COCOA_NSOBJECT_H__ -#define __COCOA_NSOBJECT_H__ - -#include "ccxCommon.h" - - -namespace cocos2d { -class NSZone; -class NSObject; -class NSString; - -class CCX_DLL CCCopying -{ -public: - virtual NSObject* copyWithZone(NSZone* pZone); -}; - -class CCX_DLL NSObject : public CCCopying -{ -protected: - // object id - unsigned int m_uID; - // count of refrence - unsigned int m_uRefrence; - // is the object autoreleased - bool m_bManaged; -public: - NSObject(void); - ~NSObject(void); - - virtual void release(void); - virtual void retain(void); - NSObject* autorelease(void); - NSObject* copy(void); - bool isSingleRefrence(void); - unsigned int retainCount(void); - bool isEqual(const NSObject* pObject); - - friend class NSAutoreleasePool; -}; -}//namespace cocos2d - -#endif // __COCOA_NSOBJECT_H__ diff --git a/cocos2dx/cocoa/NSSet.h b/cocos2dx/cocoa/NSSet.h deleted file mode 100644 index 3dec0f1308..0000000000 --- a/cocos2dx/cocoa/NSSet.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __NS_SET_H__ -#define __NS_SET_H__ - -#include -#include "NSObject.h" - -namespace cocos2d { - -typedef std::set::iterator NSSetIterator; - -class NSSet : public NSObject -{ -public: - NSSet(void); - NSSet(const NSSet &rSetObject); - virtual ~NSSet(void); - - NSSet* copy(); - NSSet* mutableCopy(); - int count(); - void addObject(NSObject *pObject); - void removeObject(NSObject *pObject); - bool containsObject(NSObject *pObject); - NSSetIterator begin(); - NSSetIterator end(); - -private: - std::set m_set; -}; - -typedef NSSet NSMutableSet; -}//namespace cocos2d - -#endif // __NS_SET_H__ - diff --git a/cocos2dx/cocoa/NSZone.cpp b/cocos2dx/cocoa/NSZone.cpp index ca1f7253fd..0ae0c54220 100644 --- a/cocos2dx/cocoa/NSZone.cpp +++ b/cocos2dx/cocoa/NSZone.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "NSZone.h" -#include "cocoa/NSObject.h" +#include "NSObject.h" namespace cocos2d { NSZone::NSZone(NSObject *pObject) diff --git a/cocos2dx/cocoa/NSZone.h b/cocos2dx/cocoa/NSZone.h deleted file mode 100644 index ed47323a9c..0000000000 --- a/cocos2dx/cocoa/NSZone.h +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __NS_ZONE_H__ -#define __NS_ZONE_H__ -#include "platform/platform.h" - -namespace cocos2d { - -class NSObject; - -class NSZone -{ -public: - NSZone(NSObject *pObject = NULL); - -public: - NSObject *m_pCopyObject; -}; -}//namespace cocos2d - -#endif // __NS_ZONE_H__ - diff --git a/cocos2dx/cocoa/selector_protocol.h b/cocos2dx/cocoa/selector_protocol.h deleted file mode 100644 index fe87589290..0000000000 --- a/cocos2dx/cocoa/selector_protocol.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -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 __COCOA_SELECTOR_PROTOCOL_H__ -#define __COCOA_SELECTOR_PROTOCOL_H__ - -#include "ccTypes.h" -#include "NSObject.h" -#include "ccxCommon.h" - -namespace cocos2d { -class CCNode; - -class CCX_DLL SelectorProtocol -{ -public: - virtual void update(ccTime dt) {}; - virtual void tick(ccTime dt){}; - virtual void callfunc(){}; - virtual void callfunc(CCNode* pSender){}; - virtual void callfunc(CCNode* pSender, void* pData){}; - virtual void menuHandler(NSObject* pSender){}; -}; - -class CCNode; -typedef void (SelectorProtocol::*SEL_SCHEDULE)(ccTime); - -typedef void (SelectorProtocol::*SEL_CallFunc)(); -typedef void (SelectorProtocol::*SEL_CallFuncN)(CCNode*); -typedef void (SelectorProtocol::*SEL_CallFuncND)(CCNode*, void*); -typedef void (SelectorProtocol::*SEL_MunuHandler)(NSObject*); - -#define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(*((SEL_SCHEDULE*)(&(&_SELECTOR))) ) -#define callfunc_selector(_SELECTOR) (SEL_CallFunc)(*((SEL_CallFunc*)(&(&_SELECTOR))) ) -#define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(*((SEL_CallFuncN*)(&(&_SELECTOR))) ) -#define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(*((SEL_CallFuncND*)(&(&_SELECTOR))) ) -#define menu_selector(_SELECTOR) (SEL_MunuHandler)(*((SEL_MunuHandler*)(&(&_SELECTOR))) ) -}//namespace cocos2d - -#endif // __COCOA_SELECTOR_PROTOCOL_H__ diff --git a/cocos2dx/cocos2dx-uphone.vcproj b/cocos2dx/cocos2dx-uphone.vcproj index e19ff31e15..dd53930a95 100644 --- a/cocos2dx/cocos2dx-uphone.vcproj +++ b/cocos2dx/cocos2dx-uphone.vcproj @@ -304,6 +304,14 @@ RelativePath=".\include\CCXEGLView.h" > + + + + @@ -312,6 +320,38 @@ RelativePath=".\include\Cocos2dDefine.h" > + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - namespace cocos2d { diff --git a/cocos2dx/include/CCNode.h b/cocos2dx/include/CCNode.h index b92b597e65..e89c87ecf2 100644 --- a/cocos2dx/include/CCNode.h +++ b/cocos2dx/include/CCNode.h @@ -28,8 +28,8 @@ THE SOFTWARE. #include "Cocos2dDefine.h" #include "ccMacros.h" #include "CCScheduler.h" -#include "cocoa/CGAffineTransform.h" -#include "cocoa/NSMutableArray.h" +#include "CGAffineTransform.h" +#include "NSMutableArray.h" #include "ccConfig.h" #include "ccxCommon.h" diff --git a/cocos2dx/include/CCPVRTexture.h b/cocos2dx/include/CCPVRTexture.h index 8c579a1eb1..ef5836e5c6 100644 --- a/cocos2dx/include/CCPVRTexture.h +++ b/cocos2dx/include/CCPVRTexture.h @@ -31,8 +31,8 @@ THE SOFTWARE. #include #include #include "Cocos2dDefine.h" -#include "cocoa/NSObject.h" -#include "cocoa/NSMutableArray.h" +#include "NSObject.h" +#include "NSMutableArray.h" #include "support/data_support/uthash.h" namespace cocos2d { diff --git a/cocos2dx/include/CCSprite.h b/cocos2dx/include/CCSprite.h index eec9220d31..2fb73d456e 100644 --- a/cocos2dx/include/CCSprite.h +++ b/cocos2dx/include/CCSprite.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "CCProtocols.h" #include "CCTextureAtlas.h" #include "ccTypes.h" -#include "cocoa/NSMutableDictionary.h" +#include "NSMutableDictionary.h" #include "ccxCommon.h" #include diff --git a/cocos2dx/include/CCSpriteFrame.h b/cocos2dx/include/CCSpriteFrame.h index 2ffd35eca8..d4d118771f 100644 --- a/cocos2dx/include/CCSpriteFrame.h +++ b/cocos2dx/include/CCSpriteFrame.h @@ -27,8 +27,8 @@ THE SOFTWARE. #include "CCNode.h" #include "CCProtocols.h" -#include "cocoa/NSMutableArray.h" -#include "cocoa/NSObject.h" +#include "NSMutableArray.h" +#include "NSObject.h" #include diff --git a/cocos2dx/include/CCSpriteFrameCache.h b/cocos2dx/include/CCSpriteFrameCache.h index 5f94e42449..2d996c8966 100644 --- a/cocos2dx/include/CCSpriteFrameCache.h +++ b/cocos2dx/include/CCSpriteFrameCache.h @@ -32,8 +32,8 @@ THE SOFTWARE. #include "CCSpriteFrame.h" #include "CCTexture2D.h" -#include "cocoa/NSObject.h" -#include "cocoa/NSMutableDictionary.h" +#include "NSObject.h" +#include "NSMutableDictionary.h" #include #include diff --git a/cocos2dx/include/CCSpriteSheet.h b/cocos2dx/include/CCSpriteSheet.h index 8885d88e99..a761054257 100644 --- a/cocos2dx/include/CCSpriteSheet.h +++ b/cocos2dx/include/CCSpriteSheet.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "CCProtocols.h" #include "CCTextureAtlas.h" #include "ccMacros.h" -#include "cocoa/NSMutableArray.h" +#include "NSMutableArray.h" namespace cocos2d { diff --git a/cocos2dx/include/CCTexture2D.h b/cocos2dx/include/CCTexture2D.h index fc004fee8e..c6e1ed61c5 100644 --- a/cocos2dx/include/CCTexture2D.h +++ b/cocos2dx/include/CCTexture2D.h @@ -29,8 +29,8 @@ THE SOFTWARE. #include #include "Cocos2dDefine.h" -#include "cocoa/NSObject.h" -#include "cocoa/CGGeometry.h" +#include "NSObject.h" +#include "CGGeometry.h" namespace cocos2d { class UIImage; diff --git a/cocos2dx/include/CCTextureAtlas.h b/cocos2dx/include/CCTextureAtlas.h index da9860d0b4..e8893782b2 100644 --- a/cocos2dx/include/CCTextureAtlas.h +++ b/cocos2dx/include/CCTextureAtlas.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include #include "ccTypes.h" -#include "cocoa/NSObject.h" +#include "NSObject.h" #include "ccConfig.h" namespace cocos2d { diff --git a/cocos2dx/include/CCTextureCache.h b/cocos2dx/include/CCTextureCache.h index 7d2a6e0b0d..f59ea82ffc 100644 --- a/cocos2dx/include/CCTextureCache.h +++ b/cocos2dx/include/CCTextureCache.h @@ -26,10 +26,10 @@ THE SOFTWARE. #define __CCTEXTURE_CACHE_H__ #include -#include "cocoa/NSObject.h" +#include "NSObject.h" /// @todo #import /// @todo #import -#include "cocoa/NSMutableDictionary.h" +#include "NSMutableDictionary.h" namespace cocos2d { class CCTexture2D; diff --git a/cocos2dx/include/ccTypes.h b/cocos2dx/include/ccTypes.h index d7262034be..ea1ad763c9 100644 --- a/cocos2dx/include/ccTypes.h +++ b/cocos2dx/include/ccTypes.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCTYPES_H__ #define __CCTYPES_H__ -#include "cocoa/CGGeometry.h" +#include "CGGeometry.h" #include namespace cocos2d { diff --git a/cocos2dx/platform/uphone/CCXEGLView_uphone.cpp b/cocos2dx/platform/uphone/CCXEGLView_uphone.cpp index 938f7d4093..ad1e82c448 100644 --- a/cocos2dx/platform/uphone/CCXEGLView_uphone.cpp +++ b/cocos2dx/platform/uphone/CCXEGLView_uphone.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include "gles/gl.h" #include "Cocos2dDefine.h" -#include "cocoa/NSSet.h" +#include "NSSet.h" #include "touch_dispatcher/CCTouch.h" #include "touch_dispatcher/CCTouchDispatcher.h" diff --git a/cocos2dx/platform/uphone/CCXEGLView_uphone.h b/cocos2dx/platform/uphone/CCXEGLView_uphone.h index 0b8391e545..0e72e0a5f6 100644 --- a/cocos2dx/platform/uphone/CCXEGLView_uphone.h +++ b/cocos2dx/platform/uphone/CCXEGLView_uphone.h @@ -28,7 +28,7 @@ THE SOFTWARE. #include "GuiBase.h" #include "TWindow.h" -#include "cocoa/CGGeometry.h" +#include "CGGeometry.h" class TApplication; diff --git a/cocos2dx/sprite_nodes/CCSprite.cpp b/cocos2dx/sprite_nodes/CCSprite.cpp index 848c7364dd..2ec6c8d139 100644 --- a/cocos2dx/sprite_nodes/CCSprite.cpp +++ b/cocos2dx/sprite_nodes/CCSprite.cpp @@ -30,9 +30,9 @@ THE SOFTWARE. #include "CCTextureCache.h" #include "support/CGPointExtension.h" #include "CCDrawingPrimitives.h" -#include "cocoa/CGGeometry.h" +#include "CGGeometry.h" #include "CCTexture2D.h" -#include "cocoa/CGAffineTransform.h" +#include "CGAffineTransform.h" #include "sstsd.h" #include diff --git a/cocos2dx/sprite_nodes/CCSpriteFrame.cpp b/cocos2dx/sprite_nodes/CCSpriteFrame.cpp index 4d560baa8c..d861a3c065 100644 --- a/cocos2dx/sprite_nodes/CCSpriteFrame.cpp +++ b/cocos2dx/sprite_nodes/CCSpriteFrame.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "CCSpriteFrame.h" #include "ccMacros.h" #include "CCTexture2D.h" -#include "cocoa/CGGeometry.h" +#include "CGGeometry.h" namespace cocos2d { // implementation of CCAnimation diff --git a/cocos2dx/support/CGPointExtension.h b/cocos2dx/support/CGPointExtension.h index 4b7c1bedb5..90e97ff7d9 100644 --- a/cocos2dx/support/CGPointExtension.h +++ b/cocos2dx/support/CGPointExtension.h @@ -41,7 +41,7 @@ THE SOFTWARE. - cpvadd( CGPointMake(1,1), CGPointMake(2,2) ); // mixing chipmunk and CG (avoid) */ -#include "cocoa/CGGeometry.h" +#include "CGGeometry.h" #include namespace cocos2d { diff --git a/cocos2dx/support/TransformUtils.cpp b/cocos2dx/support/TransformUtils.cpp index 0d01bba54b..dba3cdc7cf 100644 --- a/cocos2dx/support/TransformUtils.cpp +++ b/cocos2dx/support/TransformUtils.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ #include "TransformUtils.h" -#include "cocoa/CGAffineTransform.h" +#include "CGAffineTransform.h" namespace cocos2d { void CGAffineToGL(const CGAffineTransform *t, GLfloat *m) diff --git a/cocos2dx/textures/CCPVRTexture.cpp b/cocos2dx/textures/CCPVRTexture.cpp index 6bf7ec46d5..95cb361dc3 100644 --- a/cocos2dx/textures/CCPVRTexture.cpp +++ b/cocos2dx/textures/CCPVRTexture.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "CCPVRTexture.h" #include "ccMacros.h" -#include "cocoa/NSData.h" +#include "NSData.h" namespace cocos2d { diff --git a/cocos2dx/textures/CCTextureCache.cpp b/cocos2dx/textures/CCTextureCache.cpp index ff8888f837..1d60693535 100644 --- a/cocos2dx/textures/CCTextureCache.cpp +++ b/cocos2dx/textures/CCTextureCache.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "CCTextureCache.h" #include "CCTexture2D.h" #include "ccMacros.h" -#include "cocoa/NSData.h" +#include "NSData.h" #include "CCDirector.h" /// @todo EAGLContext static EAGLContext *auxEAGLcontext = NULL; diff --git a/cocos2dx/touch_dispatcher/CCTouch.h b/cocos2dx/touch_dispatcher/CCTouch.h index c550c0f3f0..92d2c542df 100644 --- a/cocos2dx/touch_dispatcher/CCTouch.h +++ b/cocos2dx/touch_dispatcher/CCTouch.h @@ -25,8 +25,8 @@ THE SOFTWARE. #ifndef __CC_TOUCH_H__ #define __CC_TOUCH_H__ -#include "cocoa/NSObject.h" -#include "cocoa/CGGeometry.h" +#include "NSObject.h" +#include "CGGeometry.h" namespace cocos2d { diff --git a/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h b/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h index 9b3ff9f892..69f6f4d94f 100644 --- a/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h +++ b/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __TOUCH_DISPATHCHER_CCTOUCH_DELEGATE_PROTOCOL_H__ #define __TOUCH_DISPATHCHER_CCTOUCH_DELEGATE_PROTOCOL_H__ -#include "cocoa/NSObject.h" +#include "NSObject.h" #include "ccxCommon.h" namespace cocos2d { diff --git a/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp b/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp index b27f974a78..dca5bab3f6 100644 --- a/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp +++ b/cocos2dx/touch_dispatcher/CCTouchDispatcher.cpp @@ -24,8 +24,8 @@ THE SOFTWARE. #include "CCTouchDispatcher.h" #include "CCTouchHandler.h" -#include "../cocoa/NSMutableArray.h" -#include "../cocoa/NSSet.h" +#include "NSMutableArray.h" +#include "NSSet.h" #include "CCTouch.h" #include "CCTexture2D.h" diff --git a/cocos2dx/touch_dispatcher/CCTouchDispatcher.h b/cocos2dx/touch_dispatcher/CCTouchDispatcher.h index fcdaf736f6..4ab6e1b4ee 100644 --- a/cocos2dx/touch_dispatcher/CCTouchDispatcher.h +++ b/cocos2dx/touch_dispatcher/CCTouchDispatcher.h @@ -26,8 +26,8 @@ THE SOFTWARE. #define __TOUCH_DISPATCHER_CCTOUCH_DISPATCHER_H__ #include "CCTouchDelegateProtocol.h" -#include "cocoa/NSObject.h" -#include "cocoa/NSMutableArray.h" +#include "NSObject.h" +#include "NSMutableArray.h" namespace cocos2d { typedef enum diff --git a/cocos2dx/touch_dispatcher/CCTouchHandler.h b/cocos2dx/touch_dispatcher/CCTouchHandler.h index b3080b72da..b74a19aa2a 100644 --- a/cocos2dx/touch_dispatcher/CCTouchHandler.h +++ b/cocos2dx/touch_dispatcher/CCTouchHandler.h @@ -27,8 +27,8 @@ THE SOFTWARE. #include "CCTouchDelegateProtocol.h" #include "CCTouchDispatcher.h" -#include "cocoa/NSObject.h" -#include "cocoa/NSSet.h" +#include "NSObject.h" +#include "NSSet.h" namespace cocos2d { /**