diff --git a/cocos2dx/Android.mk b/cocos2dx/Android.mk index efb01bbda7..f6f4798c82 100644 --- a/cocos2dx/Android.mk +++ b/cocos2dx/Android.mk @@ -125,9 +125,9 @@ text_input_node/CCTextFieldTTF.cpp \ textures/CCTexture2D.cpp \ textures/CCTextureAtlas.cpp \ textures/CCTextureCache.cpp \ -platform/third_party/common/etc/etc1.cpp\ -platform/third_party/common/s3tc/s3tc.cpp\ -platform/third_party/common/atitc/atitc.cpp\ +platform/third_party/common/etc/etc1.cpp \ +platform/third_party/common/s3tc/s3tc.cpp \ +platform/third_party/common/atitc/atitc.cpp \ tilemap_parallax_nodes/CCParallaxNode.cpp \ tilemap_parallax_nodes/CCTMXLayer.cpp \ tilemap_parallax_nodes/CCTMXObjectGroup.cpp \ @@ -142,16 +142,16 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/kazmath/include \ $(LOCAL_PATH)/platform/android \ - $(LOCAL_PATH)/platform/third_party/common/etc\ - $(LOCAL_PATH)/platform/third_party/common/s3tc\ + $(LOCAL_PATH)/platform/third_party/common/etc \ + $(LOCAL_PATH)/platform/third_party/common/s3tc \ $(LOCAL_PATH)/platform/third_party/common/atitc LOCAL_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/kazmath/include \ $(LOCAL_PATH)/platform/android \ - $(LOCAL_PATH)/platform/third_party/common/etc\ - $(LOCAL_PATH)/platform/third_party/common/s3tc\ + $(LOCAL_PATH)/platform/third_party/common/etc \ + $(LOCAL_PATH)/platform/third_party/common/s3tc \ $(LOCAL_PATH)/platform/third_party/common/atitc diff --git a/cocos2dx/platform/CCImageCommon_cpp.h b/cocos2dx/platform/CCImageCommon_cpp.h index fb4a67abe7..cb4a79e349 100644 --- a/cocos2dx/platform/CCImageCommon_cpp.h +++ b/cocos2dx/platform/CCImageCommon_cpp.h @@ -468,10 +468,12 @@ bool Image::initWithImageData(const unsigned char * data, int dataLen) if (ZipUtils::ccIsCCZBuffer(data, dataLen)) { unpackedLen = ZipUtils::ccInflateCCZBuffer(data, dataLen, &unpackedData); - }else if (ZipUtils::ccIsGZipBuffer(data, dataLen)) + } + else if (ZipUtils::ccIsGZipBuffer(data, dataLen)) { unpackedLen = ZipUtils::ccInflateMemory(const_cast(data), dataLen, &unpackedData); - }else + } + else { unpackedData = const_cast(data); unpackedLen = dataLen; @@ -622,25 +624,32 @@ Image::Format Image::detectFormat(const unsigned char * data, int dataLen) if (isPng(data, dataLen)) { return Format::PNG; - }else if (isJpg(data, dataLen)) + } + else if (isJpg(data, dataLen)) { return Format::JPG; - }else if (isTiff(data, dataLen)) + } + else if (isTiff(data, dataLen)) { return Format::TIFF; - }else if (isWebp(data, dataLen)) + } + else if (isWebp(data, dataLen)) { return Format::WEBP; - }else if (isPvr(data, dataLen)) + } + else if (isPvr(data, dataLen)) { return Format::PVR; - }else if (isEtc(data, dataLen)) + } + else if (isEtc(data, dataLen)) { return Format::ETC; - }else if (isS3TC(data, dataLen)) + } + else if (isS3TC(data, dataLen)) { return Format::S3TC; - }else if (isATITC(data, dataLen)) + } + else if (isATITC(data, dataLen)) { return Format::ATITC; } diff --git a/cocos2dx/proj.linux/Makefile b/cocos2dx/proj.linux/Makefile index 0ce2b90748..dc539d17ec 100644 --- a/cocos2dx/proj.linux/Makefile +++ b/cocos2dx/proj.linux/Makefile @@ -86,8 +86,8 @@ SOURCES = ../actions/CCAction.cpp \ ../platform/linux/CCImage.cpp \ ../platform/linux/CCDevice.cpp \ ../platform/third_party/common/etc/etc1.cpp \ -../platform/third_party/common/s3tc/s3tc.cpp\ -../platform/third_party/common/atitc/atitc.cpp\ +../platform/third_party/common/s3tc/s3tc.cpp \ +../platform/third_party/common/atitc/atitc.cpp \ ../script_support/CCScriptSupport.cpp \ ../sprite_nodes/CCAnimation.cpp \ ../sprite_nodes/CCAnimationCache.cpp \