From 432534d85757b6767ab334b2ab0a027bc91eadca Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 20 Jan 2014 17:31:12 +0800 Subject: [PATCH] =?UTF-8?q?#include=20=E2=80=9Ccocos2d.h=E2=80=9D=20was=20?= =?UTF-8?q?FORBIDDEN=20in=20cocos=20modules.=20Reduces=20the=20dependence?= =?UTF-8?q?=20=20when=20header=20file=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos/2d/CCFontCharMap.cpp | 4 ++++ cocos/2d/CCFontCharMap.h | 1 - cocos/network/SocketIO.cpp | 3 +++ cocos/network/SocketIO.h | 5 ++++- cocos/storage/local-storage/LocalStorage.cpp | 2 +- cocos/storage/local-storage/LocalStorageAndroid.cpp | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cocos/2d/CCFontCharMap.cpp b/cocos/2d/CCFontCharMap.cpp index 217312762b..85f61d57de 100644 --- a/cocos/2d/CCFontCharMap.cpp +++ b/cocos/2d/CCFontCharMap.cpp @@ -25,6 +25,10 @@ #include "CCFontCharMap.h" #include "CCFontAtlas.h" +#include "CCFileUtils.h" +#include "CCDirector.h" +#include "CCTextureCache.h" +#include "ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/2d/CCFontCharMap.h b/cocos/2d/CCFontCharMap.h index 83352ddb4e..a39b5f7032 100644 --- a/cocos/2d/CCFontCharMap.h +++ b/cocos/2d/CCFontCharMap.h @@ -26,7 +26,6 @@ #ifndef _CCFontCharMap_h_ #define _CCFontCharMap_h_ -#include "cocos2d.h" #include "CCFont.h" NS_CC_BEGIN diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index c38ed4c70d..cc4b489e32 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -28,9 +28,12 @@ ****************************************************************************/ #include "SocketIO.h" +#include "CCDirector.h" +#include "CCScheduler.h" #include "WebSocket.h" #include "HttpClient.h" #include +#include NS_CC_BEGIN diff --git a/cocos/network/SocketIO.h b/cocos/network/SocketIO.h index 599a6c4cd0..8562fc1ba9 100644 --- a/cocos/network/SocketIO.h +++ b/cocos/network/SocketIO.h @@ -59,7 +59,10 @@ in the onClose method the pointer should be set to NULL or used to connect to a #ifndef __CC_SOCKETIO_H__ #define __CC_SOCKETIO_H__ -#include "cocos2d.h" +#include "CCPlatformMacros.h" +#include "CCMap.h" + +#include NS_CC_BEGIN diff --git a/cocos/storage/local-storage/LocalStorage.cpp b/cocos/storage/local-storage/LocalStorage.cpp index 436432abce..dd0b5e3635 100644 --- a/cocos/storage/local-storage/LocalStorage.cpp +++ b/cocos/storage/local-storage/LocalStorage.cpp @@ -27,7 +27,7 @@ Works on cocos2d-iphone and cocos2d-x. */ -#include "cocos2d.h" +#include "CCPlatformMacros.h" #if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) diff --git a/cocos/storage/local-storage/LocalStorageAndroid.cpp b/cocos/storage/local-storage/LocalStorageAndroid.cpp index 93de8f5dc2..40b4d27bda 100644 --- a/cocos/storage/local-storage/LocalStorageAndroid.cpp +++ b/cocos/storage/local-storage/LocalStorageAndroid.cpp @@ -28,7 +28,7 @@ Works on cocos2d-iphone and cocos2d-x. */ -#include "cocos2d.h" +#include "CCPlatformMacros.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)