mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' into develop_migrate_math_lib_merge
Conflicts: build/cocos2d_libs.xcodeproj/project.pbxproj build/cocos2d_tests.xcodeproj/project.pbxproj
This commit is contained in:
commit
1670e07300
8
AUTHORS
8
AUTHORS
|
@ -763,6 +763,7 @@ Developers:
|
||||||
|
|
||||||
wefiends
|
wefiends
|
||||||
s3tc compressed textures with no mipmaps fail to be loaded.
|
s3tc compressed textures with no mipmaps fail to be loaded.
|
||||||
|
Added createWithFullscreen overloaded method that sets video mode
|
||||||
|
|
||||||
floatinghotpot
|
floatinghotpot
|
||||||
Fixed a bug that no callback is invoked when websocket connection fails
|
Fixed a bug that no callback is invoked when websocket connection fails
|
||||||
|
@ -815,6 +816,13 @@ Developers:
|
||||||
|
|
||||||
iSevenDays
|
iSevenDays
|
||||||
Fixed a bug that the result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG
|
Fixed a bug that the result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG
|
||||||
|
Fixed a potential memory leak in CCEditBoxImplIOS.mm
|
||||||
|
|
||||||
|
ololomax
|
||||||
|
Fixed a potential crash in SceneReader::createNodeWithSceneFile
|
||||||
|
|
||||||
|
gaoxiaosong
|
||||||
|
Fixed a warning in cpCollision.c
|
||||||
|
|
||||||
Retired Core Developers:
|
Retired Core Developers:
|
||||||
WenSheng Yang
|
WenSheng Yang
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
334022fee8065e04cd3ba41672900023d8b45e35
|
3dec43835640892d3595d2063489624cf216dd73
|
|
@ -141,6 +141,7 @@ include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/renderer
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/renderer
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/base
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/base
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/deprecated
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/physics
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/physics
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/math/kazmath
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/math/kazmath
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
e116569f8c620909ae056a474fdb467f0345daf2
|
56ec54242dca8dbed811838ec519e42daf3c9871
|
|
@ -1 +1 @@
|
||||||
c104bf199183bd6c8c2d50acfb95bfc36c34bcfa
|
296ba81a851ee3cf6d771aad4a55f0049089dc57
|
|
@ -30,7 +30,6 @@ CCClippingNode.cpp \
|
||||||
CCComponent.cpp \
|
CCComponent.cpp \
|
||||||
CCComponentContainer.cpp \
|
CCComponentContainer.cpp \
|
||||||
CCConfiguration.cpp \
|
CCConfiguration.cpp \
|
||||||
CCDeprecated.cpp \
|
|
||||||
CCDirector.cpp \
|
CCDirector.cpp \
|
||||||
CCDrawingPrimitives.cpp \
|
CCDrawingPrimitives.cpp \
|
||||||
CCDrawNode.cpp \
|
CCDrawNode.cpp \
|
||||||
|
@ -71,7 +70,6 @@ CCMenu.cpp \
|
||||||
CCMenuItem.cpp \
|
CCMenuItem.cpp \
|
||||||
CCMotionStreak.cpp \
|
CCMotionStreak.cpp \
|
||||||
CCNode.cpp \
|
CCNode.cpp \
|
||||||
CCNotificationCenter.cpp \
|
|
||||||
CCParallaxNode.cpp \
|
CCParallaxNode.cpp \
|
||||||
CCParticleBatchNode.cpp \
|
CCParticleBatchNode.cpp \
|
||||||
CCParticleExamples.cpp \
|
CCParticleExamples.cpp \
|
||||||
|
@ -128,20 +126,22 @@ renderer/CCRenderer.cpp \
|
||||||
renderer/CCRenderMaterial.cpp \
|
renderer/CCRenderMaterial.cpp \
|
||||||
../base/atitc.cpp \
|
../base/atitc.cpp \
|
||||||
../base/CCAffineTransform.cpp \
|
../base/CCAffineTransform.cpp \
|
||||||
../base/CCArray.cpp \
|
|
||||||
../base/CCAutoreleasePool.cpp \
|
../base/CCAutoreleasePool.cpp \
|
||||||
../base/CCConsole.cpp \
|
../base/CCConsole.cpp \
|
||||||
../base/CCData.cpp \
|
../base/CCData.cpp \
|
||||||
../base/CCDataVisitor.cpp \
|
../base/CCDataVisitor.cpp \
|
||||||
../base/CCDictionary.cpp \
|
|
||||||
../base/CCGeometry.cpp \
|
../base/CCGeometry.cpp \
|
||||||
../base/CCNS.cpp \
|
../base/CCNS.cpp \
|
||||||
../base/CCRef.cpp \
|
../base/CCRef.cpp \
|
||||||
../base/CCSet.cpp \
|
|
||||||
../base/CCString.cpp \
|
|
||||||
../base/CCValue.cpp \
|
../base/CCValue.cpp \
|
||||||
../base/etc1.cpp \
|
../base/etc1.cpp \
|
||||||
../base/s3tc.cpp \
|
../base/s3tc.cpp \
|
||||||
|
../deprecated/CCArray.cpp \
|
||||||
|
../deprecated/CCSet.cpp \
|
||||||
|
../deprecated/CCString.cpp \
|
||||||
|
../deprecated/CCDictionary.cpp \
|
||||||
|
../deprecated/CCDeprecated.cpp \
|
||||||
|
../deprecated/CCNotificationCenter.cpp \
|
||||||
../math/kazmath/kazmath/aabb.c \
|
../math/kazmath/kazmath/aabb.c \
|
||||||
../math/kazmath/kazmath/mat3.c \
|
../math/kazmath/kazmath/mat3.c \
|
||||||
../math/kazmath/kazmath/mat4.c \
|
../math/kazmath/kazmath/mat4.c \
|
||||||
|
@ -174,22 +174,26 @@ renderer/CCRenderMaterial.cpp \
|
||||||
|
|
||||||
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
|
||||||
|
$(LOCAL_PATH)/.. \
|
||||||
$(LOCAL_PATH)/renderer \
|
$(LOCAL_PATH)/renderer \
|
||||||
$(LOCAL_PATH)/../math/kazmath \
|
$(LOCAL_PATH)/../math/kazmath \
|
||||||
platform/android \
|
platform/android \
|
||||||
$(LOCAL_PATH)/../physics \
|
$(LOCAL_PATH)/../physics \
|
||||||
$(LOCAL_PATH)/../base \
|
$(LOCAL_PATH)/../base \
|
||||||
|
$(LOCAL_PATH)/../deprecated \
|
||||||
$(LOCAL_PATH)/../../external/tinyxml2 \
|
$(LOCAL_PATH)/../../external/tinyxml2 \
|
||||||
$(LOCAL_PATH)/../../external/unzip \
|
$(LOCAL_PATH)/../../external/unzip \
|
||||||
$(LOCAL_PATH)/../../external/chipmunk/include/chipmunk \
|
$(LOCAL_PATH)/../../external/chipmunk/include/chipmunk \
|
||||||
$(LOCAL_PATH)/../../external/xxhash
|
$(LOCAL_PATH)/../../external/xxhash
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
|
||||||
|
$(LOCAL_PATH)/.. \
|
||||||
$(LOCAL_PATH)/renderer \
|
$(LOCAL_PATH)/renderer \
|
||||||
$(LOCAL_PATH)/../math/kazmath \
|
$(LOCAL_PATH)/../math/kazmath \
|
||||||
$(LOCAL_PATH)/platform/android \
|
$(LOCAL_PATH)/platform/android \
|
||||||
$(LOCAL_PATH)/../physics \
|
$(LOCAL_PATH)/../physics \
|
||||||
$(LOCAL_PATH)/../base \
|
$(LOCAL_PATH)/../base \
|
||||||
|
$(LOCAL_PATH)/../deprecated \
|
||||||
$(LOCAL_PATH)/../../external/tinyxml2 \
|
$(LOCAL_PATH)/../../external/tinyxml2 \
|
||||||
$(LOCAL_PATH)/../../external/unzip \
|
$(LOCAL_PATH)/../../external/unzip \
|
||||||
$(LOCAL_PATH)/../../external/chipmunk/include/chipmunk \
|
$(LOCAL_PATH)/../../external/chipmunk/include/chipmunk \
|
||||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||||
#include "CCActionInterval.h"
|
#include "CCActionInterval.h"
|
||||||
#include "CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
//
|
//
|
||||||
|
|
|
@ -131,7 +131,7 @@ void PointArray::insertControlPoint(Point &controlPoint, ssize_t index)
|
||||||
|
|
||||||
Point PointArray::getControlPointAtIndex(ssize_t index)
|
Point PointArray::getControlPointAtIndex(ssize_t index)
|
||||||
{
|
{
|
||||||
index = MIN(_controlPoints->size()-1, MAX(index, 0));
|
index = MIN(static_cast<ssize_t>(_controlPoints->size())-1, MAX(index, 0));
|
||||||
return *(_controlPoints->at(index));
|
return *(_controlPoints->at(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ THE SOFTWARE.
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "ccCArray.h"
|
#include "ccCArray.h"
|
||||||
#include "uthash.h"
|
#include "uthash.h"
|
||||||
#include "CCSet.h"
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
//
|
//
|
||||||
|
|
|
@ -29,7 +29,6 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include "CCPlatformConfig.h"
|
#include "CCPlatformConfig.h"
|
||||||
#include "CCRef.h"
|
#include "CCRef.h"
|
||||||
#include "CCArray.h"
|
|
||||||
#include "CCValue.h"
|
#include "CCValue.h"
|
||||||
#include "CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
#include "CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||||
#include "CCAnimation.h"
|
#include "CCAnimation.h"
|
||||||
#include "CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
#include "CCSpriteFrameCache.h"
|
#include "CCSpriteFrameCache.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -28,13 +28,8 @@ THE SOFTWARE.
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "ccConfig.h"
|
#include "ccConfig.h"
|
||||||
#include "CCDictionary.h"
|
|
||||||
#include "CCInteger.h"
|
|
||||||
#include "CCBool.h"
|
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
extern const char* cocos2dVersion();
|
extern const char* cocos2dVersion();
|
||||||
|
@ -179,7 +174,7 @@ void Configuration::purgeConfiguration()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Configuration::checkForGLExtension(const string &searchName) const
|
bool Configuration::checkForGLExtension(const std::string &searchName) const
|
||||||
{
|
{
|
||||||
return (_glExtensions && strstr(_glExtensions, searchName.c_str() ) ) ? true : false;
|
return (_glExtensions && strstr(_glExtensions, searchName.c_str() ) ) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include "CCRef.h"
|
#include "CCRef.h"
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
#include "CCString.h"
|
|
||||||
#include "CCValue.h"
|
#include "CCValue.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ THE SOFTWARE.
|
||||||
#include "CCDrawingPrimitives.h"
|
#include "CCDrawingPrimitives.h"
|
||||||
#include "CCNS.h"
|
#include "CCNS.h"
|
||||||
#include "CCScene.h"
|
#include "CCScene.h"
|
||||||
#include "CCArray.h"
|
|
||||||
#include "CCScheduler.h"
|
#include "CCScheduler.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "CCTransition.h"
|
#include "CCTransition.h"
|
||||||
|
|
|
@ -1371,6 +1371,13 @@ void EventDispatcher::setDirtyForNode(Node* node)
|
||||||
{
|
{
|
||||||
_dirtyNodes.insert(node);
|
_dirtyNodes.insert(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also set the dirty flag for node's children
|
||||||
|
const auto& children = node->getChildren();
|
||||||
|
for (const auto& child : children)
|
||||||
|
{
|
||||||
|
setDirtyForNode(child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventDispatcher::setDirty(const EventListener::ListenerID& listenerID, DirtyFlag flag)
|
void EventDispatcher::setDirty(const EventListener::ListenerID& listenerID, DirtyFlag flag)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCFontAtlas.h"
|
#include "CCFontAtlas.h"
|
||||||
#include "CCMap.h"
|
#include "CCMap.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCTextureCache.h"
|
#include "CCTextureCache.h"
|
||||||
#include "ccUTF8.h"
|
#include "ccUTF8.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
|
|
@ -32,7 +32,7 @@ THE SOFTWARE.
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
#include "uthash.h"
|
#include "uthash.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
// extern
|
// extern
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
#include "kazmath/kazmath.h"
|
#include "kazmath/kazmath.h"
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "CCEventType.h"
|
#include "CCEventType.h"
|
||||||
#include "CCEventCustom.h"
|
#include "CCEventCustom.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
@ -47,176 +48,142 @@ Label* Label::create()
|
||||||
{
|
{
|
||||||
auto ret = new Label();
|
auto ret = new Label();
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
ret->autorelease();
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Label* Label::createWithFontDefinition(const std::string& text, const FontDefinition &textDefinition)
|
|
||||||
{
|
|
||||||
auto ret = new Label();
|
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
ret->setFontDefinition(textDefinition);
|
|
||||||
ret->setString(text);
|
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* Label::create(const std::string& text, const std::string& fontName, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */)
|
Label* Label::create(const std::string& text, const std::string& font, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */)
|
||||||
|
{
|
||||||
|
if (FileUtils::getInstance()->isFileExist(font))
|
||||||
|
{
|
||||||
|
return createWithTTF(text,font,fontSize,dimensions,hAlignment,vAlignment);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return createWithSystemFont(text,font,fontSize,dimensions,hAlignment,vAlignment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label* Label::createWithSystemFont(const std::string& text, const std::string& font, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */)
|
||||||
{
|
{
|
||||||
auto ret = new Label(nullptr,hAlignment,vAlignment);
|
auto ret = new Label(nullptr,hAlignment,vAlignment);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
do
|
ret->setSystemFontName(font);
|
||||||
{
|
ret->setSystemFontSize(fontSize);
|
||||||
if (FileUtils::getInstance()->isFileExist(fontName))
|
ret->setDimensions(dimensions.width, dimensions.height);
|
||||||
{
|
|
||||||
TTFConfig ttfConfig(fontName.c_str(),fontSize,GlyphCollection::DYNAMIC);
|
|
||||||
if (ret->setTTFConfig(ttfConfig))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FontDefinition fontDef;
|
|
||||||
fontDef._fontName = fontName;
|
|
||||||
fontDef._fontSize = fontSize;
|
|
||||||
fontDef._dimensions = dimensions;
|
|
||||||
fontDef._alignment = hAlignment;
|
|
||||||
fontDef._vertAlignment = vAlignment;
|
|
||||||
ret->setFontDefinition(fontDef);
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
ret->setDimensions(dimensions.width,dimensions.height);
|
|
||||||
ret->setString(text);
|
ret->setString(text);
|
||||||
ret->autorelease();
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
ret->autorelease();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete ret;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Label* Label::createWithTTF(const std::string& text, const std::string& fontFile, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */)
|
||||||
|
{
|
||||||
|
auto ret = new Label(nullptr,hAlignment,vAlignment);
|
||||||
|
|
||||||
|
if (ret && FileUtils::getInstance()->isFileExist(fontFile))
|
||||||
|
{
|
||||||
|
TTFConfig ttfConfig(fontFile.c_str(),fontSize,GlyphCollection::DYNAMIC);
|
||||||
|
if (ret->setTTFConfig(ttfConfig))
|
||||||
|
{
|
||||||
|
ret->setDimensions(dimensions.width,dimensions.height);
|
||||||
|
ret->setString(text);
|
||||||
|
|
||||||
|
ret->autorelease();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete ret;
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* Label::createWithTTF(const TTFConfig& ttfConfig, const std::string& text, TextHAlignment alignment /* = TextHAlignment::CENTER */, int maxLineWidth /* = 0 */)
|
Label* Label::createWithTTF(const TTFConfig& ttfConfig, const std::string& text, TextHAlignment alignment /* = TextHAlignment::CENTER */, int maxLineWidth /* = 0 */)
|
||||||
{
|
{
|
||||||
auto ret = new Label(nullptr,alignment);
|
auto ret = new Label(nullptr,alignment);
|
||||||
|
|
||||||
if (!ret)
|
if (ret && FileUtils::getInstance()->isFileExist(ttfConfig.fontFilePath) && ret->setTTFConfig(ttfConfig))
|
||||||
{
|
{
|
||||||
return nullptr;
|
ret->setMaxLineWidth(maxLineWidth);
|
||||||
|
ret->setString(text);
|
||||||
|
ret->autorelease();
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
delete ret;
|
||||||
{
|
return nullptr;
|
||||||
if( FileUtils::getInstance()->isFileExist(ttfConfig.fontFilePath) && ret->setTTFConfig(ttfConfig))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
FontDefinition fontDef;
|
|
||||||
fontDef._fontName = ttfConfig.fontFilePath;
|
|
||||||
fontDef._fontSize = ttfConfig.fontSize;
|
|
||||||
fontDef._dimensions = Size::ZERO;
|
|
||||||
fontDef._alignment = alignment;
|
|
||||||
fontDef._vertAlignment = TextVAlignment::TOP;
|
|
||||||
ret->setFontDefinition(fontDef);
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
ret->setMaxLineWidth(maxLineWidth);
|
|
||||||
ret->setString(text);
|
|
||||||
ret->autorelease();
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Label* Label::createWithTTF(const std::string& text, const std::string& fontFilePath, int fontSize, int maxLineWidth /* = 0 */, TextHAlignment alignment /* = TextHAlignment::CENTER */, GlyphCollection glyphs /* = GlyphCollection::NEHE */, const char *customGlyphs /* = 0 */, bool useDistanceField /* = false */)
|
|
||||||
{
|
|
||||||
TTFConfig ttfConfig(fontFilePath.c_str(),fontSize,glyphs,customGlyphs,useDistanceField);
|
|
||||||
return createWithTTF(ttfConfig,text,alignment,maxLineWidth);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* Label::createWithBMFont(const std::string& bmfontFilePath, const std::string& text,const TextHAlignment& alignment /* = TextHAlignment::LEFT */, int maxLineWidth /* = 0 */, const Point& imageOffset /* = Point::ZERO */)
|
Label* Label::createWithBMFont(const std::string& bmfontFilePath, const std::string& text,const TextHAlignment& alignment /* = TextHAlignment::LEFT */, int maxLineWidth /* = 0 */, const Point& imageOffset /* = Point::ZERO */)
|
||||||
{
|
{
|
||||||
auto ret = new Label(nullptr,alignment);
|
auto ret = new Label(nullptr,alignment);
|
||||||
|
|
||||||
if (!ret)
|
if (ret && ret->setBMFontFilePath(bmfontFilePath,imageOffset))
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if (ret->setBMFontFilePath(bmfontFilePath,imageOffset))
|
|
||||||
{
|
{
|
||||||
ret->setMaxLineWidth(maxLineWidth);
|
ret->setMaxLineWidth(maxLineWidth);
|
||||||
ret->setString(text);
|
ret->setString(text);
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
delete ret;
|
||||||
delete ret;
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* Label::createWithCharMap(const std::string& plistFile)
|
Label* Label::createWithCharMap(const std::string& plistFile)
|
||||||
{
|
{
|
||||||
auto ret = new Label();
|
auto ret = new Label();
|
||||||
|
|
||||||
if (!ret)
|
if (ret && ret->setCharMap(plistFile))
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if (ret->setCharMap(plistFile))
|
|
||||||
{
|
{
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
delete ret;
|
||||||
delete ret;
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* Label::createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap)
|
Label* Label::createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap)
|
||||||
{
|
{
|
||||||
auto ret = new Label();
|
auto ret = new Label();
|
||||||
|
|
||||||
if (!ret)
|
if (ret && ret->setCharMap(texture,itemWidth,itemHeight,startCharMap))
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if (ret->setCharMap(texture,itemWidth,itemHeight,startCharMap))
|
|
||||||
{
|
{
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
delete ret;
|
||||||
delete ret;
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* Label::createWithCharMap(const std::string& charMapFile, int itemWidth, int itemHeight, int startCharMap)
|
Label* Label::createWithCharMap(const std::string& charMapFile, int itemWidth, int itemHeight, int startCharMap)
|
||||||
{
|
{
|
||||||
auto ret = new Label();
|
auto ret = new Label();
|
||||||
|
|
||||||
if (!ret)
|
if (ret && ret->setCharMap(charMapFile,itemWidth,itemHeight,startCharMap))
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if (ret->setCharMap(charMapFile,itemWidth,itemHeight,startCharMap))
|
|
||||||
{
|
{
|
||||||
ret->autorelease();
|
ret->autorelease();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
delete ret;
|
||||||
delete ret;
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Label::setCharMap(const std::string& plistFile)
|
bool Label::setCharMap(const std::string& plistFile)
|
||||||
|
@ -296,11 +263,22 @@ Label::Label(FontAtlas *atlas /* = nullptr */, TextHAlignment hAlignment /* = Te
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||||
auto toBackgroundListener = EventListenerCustom::create(EVENT_COME_TO_BACKGROUND, CC_CALLBACK_1(Label::listenToBackground, this));
|
auto toBackgroundListener = EventListenerCustom::create(EVENT_COME_TO_BACKGROUND, [this](EventCustom* event){
|
||||||
|
if (_fontAtlas && _currentLabelType == LabelType::TTF)
|
||||||
|
{
|
||||||
|
_batchNodes.clear();
|
||||||
|
_batchNodes.push_back(this);
|
||||||
|
Node::removeAllChildrenWithCleanup(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
_eventDispatcher->addEventListenerWithSceneGraphPriority(toBackgroundListener, this);
|
_eventDispatcher->addEventListenerWithSceneGraphPriority(toBackgroundListener, this);
|
||||||
#endif
|
#endif
|
||||||
|
auto purgeTextureListener = EventListenerCustom::create(FontAtlas::EVENT_PURGE_TEXTURES, [this](EventCustom* event){
|
||||||
auto purgeTextureListener = EventListenerCustom::create(FontAtlas::EVENT_PURGE_TEXTURES, CC_CALLBACK_1(Label::listenToFontAtlasPurge, this));
|
if (_fontAtlas && _currentLabelType == LabelType::TTF && event->getUserData() == _fontAtlas)
|
||||||
|
{
|
||||||
|
alignText();
|
||||||
|
}
|
||||||
|
});
|
||||||
_eventDispatcher->addEventListenerWithSceneGraphPriority(purgeTextureListener, this);
|
_eventDispatcher->addEventListenerWithSceneGraphPriority(purgeTextureListener, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,14 +301,9 @@ void Label::reset()
|
||||||
TTFConfig temp;
|
TTFConfig temp;
|
||||||
_fontConfig = temp;
|
_fontConfig = temp;
|
||||||
|
|
||||||
_fontDefinition._fontName = "Helvetica";
|
|
||||||
_fontDefinition._fontSize = 12;
|
|
||||||
_fontDefinition._alignment = _hAlignment;
|
|
||||||
_fontDefinition._vertAlignment = _vAlignment;
|
|
||||||
|
|
||||||
_fontDirty = false;
|
_fontDirty = false;
|
||||||
_fontName = "Helvetica";
|
_systemFont = "Helvetica";
|
||||||
_fontSize = 12;
|
_systemFontSize = 12;
|
||||||
|
|
||||||
_batchNodes.clear();
|
_batchNodes.clear();
|
||||||
_batchNodes.push_back(this);
|
_batchNodes.push_back(this);
|
||||||
|
@ -476,9 +449,6 @@ bool Label::setTTFConfig(const TTFConfig& ttfConfig)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_fontDefinition._shadow._shadowEnabled = false;
|
|
||||||
_fontDefinition._stroke._strokeEnabled = false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,27 +468,6 @@ bool Label::setBMFontFilePath(const std::string& bmfontFilePath, const Point& im
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label::setFontDefinition(const FontDefinition& textDefinition)
|
|
||||||
{
|
|
||||||
reset();
|
|
||||||
_fontDefinition = textDefinition;
|
|
||||||
_fontName = textDefinition._fontName;
|
|
||||||
_fontSize = textDefinition._fontSize;
|
|
||||||
|
|
||||||
_shadowEnabled = textDefinition._shadow._shadowEnabled;
|
|
||||||
if (_shadowEnabled)
|
|
||||||
{
|
|
||||||
enableShadow(Color4B::BLACK,_fontDefinition._shadow._shadowOffset,_fontDefinition._shadow._shadowBlur);
|
|
||||||
}
|
|
||||||
|
|
||||||
_textColor = Color4B(_fontDefinition._fontFillColor);
|
|
||||||
_textColorF.r = _textColor.r / 255.0f;
|
|
||||||
_textColorF.g = _textColor.g / 255.0f;
|
|
||||||
_textColorF.b = _textColor.b / 255.0f;
|
|
||||||
_textColorF.a = _textColor.a / 255.0f;
|
|
||||||
_contentDirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Label::setString(const std::string& text)
|
void Label::setString(const std::string& text)
|
||||||
{
|
{
|
||||||
_originalUTF8String = text;
|
_originalUTF8String = text;
|
||||||
|
@ -529,9 +478,6 @@ void Label::setAlignment(TextHAlignment hAlignment,TextVAlignment vAlignment)
|
||||||
{
|
{
|
||||||
if (hAlignment != _hAlignment || vAlignment != _vAlignment)
|
if (hAlignment != _hAlignment || vAlignment != _vAlignment)
|
||||||
{
|
{
|
||||||
_fontDefinition._alignment = hAlignment;
|
|
||||||
_fontDefinition._vertAlignment = vAlignment;
|
|
||||||
|
|
||||||
_hAlignment = hAlignment;
|
_hAlignment = hAlignment;
|
||||||
_vAlignment = vAlignment;
|
_vAlignment = vAlignment;
|
||||||
|
|
||||||
|
@ -552,9 +498,6 @@ void Label::setDimensions(unsigned int width,unsigned int height)
|
||||||
{
|
{
|
||||||
if (height != _labelHeight || width != _labelWidth)
|
if (height != _labelHeight || width != _labelWidth)
|
||||||
{
|
{
|
||||||
_fontDefinition._dimensions.width = width;
|
|
||||||
_fontDefinition._dimensions.height = height;
|
|
||||||
|
|
||||||
_labelWidth = width;
|
_labelWidth = width;
|
||||||
_labelHeight = height;
|
_labelHeight = height;
|
||||||
_labelDimensions.width = width;
|
_labelDimensions.width = width;
|
||||||
|
@ -802,27 +745,6 @@ void Label::sortAllChildren()
|
||||||
// Label ignore sort children
|
// Label ignore sort children
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label::setLabelEffect(LabelEffect effect,const Color3B& effectColor)
|
|
||||||
{
|
|
||||||
switch (effect)
|
|
||||||
{
|
|
||||||
case cocos2d::LabelEffect::NORMAL:
|
|
||||||
disableEffect();
|
|
||||||
break;
|
|
||||||
case cocos2d::LabelEffect::OUTLINE:
|
|
||||||
enableOutline(Color4B(effectColor));
|
|
||||||
break;
|
|
||||||
case cocos2d::LabelEffect::SHADOW:
|
|
||||||
enableShadow(Color4B(effectColor));
|
|
||||||
break;
|
|
||||||
case cocos2d::LabelEffect::GLOW:
|
|
||||||
enableGlow(Color4B(effectColor));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Label::enableGlow(const Color4B& glowColor)
|
void Label::enableGlow(const Color4B& glowColor)
|
||||||
{
|
{
|
||||||
if(! _useDistanceField)
|
if(! _useDistanceField)
|
||||||
|
@ -846,6 +768,7 @@ void Label::enableOutline(const Color4B& outlineColor,int outlineSize /* = -1 */
|
||||||
|
|
||||||
if (outlineSize > 0)
|
if (outlineSize > 0)
|
||||||
{
|
{
|
||||||
|
_outlineSize = outlineSize;
|
||||||
if (_currentLabelType == LabelType::TTF)
|
if (_currentLabelType == LabelType::TTF)
|
||||||
{
|
{
|
||||||
if (_fontConfig.outlineSize != outlineSize)
|
if (_fontConfig.outlineSize != outlineSize)
|
||||||
|
@ -856,9 +779,6 @@ void Label::enableOutline(const Color4B& outlineColor,int outlineSize /* = -1 */
|
||||||
updateShaderProgram();
|
updateShaderProgram();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_fontDefinition._stroke._strokeEnabled = true;
|
|
||||||
_fontDefinition._stroke._strokeSize = outlineSize;
|
|
||||||
_fontDefinition._stroke._strokeColor = Color3B(outlineColor.r,outlineColor.g,outlineColor.b);
|
|
||||||
|
|
||||||
_currLabelEffect = LabelEffect::OUTLINE;
|
_currLabelEffect = LabelEffect::OUTLINE;
|
||||||
_contentDirty = true;
|
_contentDirty = true;
|
||||||
|
@ -868,7 +788,6 @@ void Label::enableOutline(const Color4B& outlineColor,int outlineSize /* = -1 */
|
||||||
void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const Size &offset /* = Size(2 ,-2)*/, int blurRadius /* = 0 */)
|
void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const Size &offset /* = Size(2 ,-2)*/, int blurRadius /* = 0 */)
|
||||||
{
|
{
|
||||||
_shadowEnabled = true;
|
_shadowEnabled = true;
|
||||||
_fontDefinition._shadow._shadowEnabled = false;
|
|
||||||
_shadowDirty = true;
|
_shadowDirty = true;
|
||||||
|
|
||||||
_shadowColor.r = shadowColor.r;
|
_shadowColor.r = shadowColor.r;
|
||||||
|
@ -991,15 +910,8 @@ void Label::draw(Renderer *renderer, const Matrix &transform, bool transformUpda
|
||||||
void Label::createSpriteWithFontDefinition()
|
void Label::createSpriteWithFontDefinition()
|
||||||
{
|
{
|
||||||
_currentLabelType = LabelType::STRING_TEXTURE;
|
_currentLabelType = LabelType::STRING_TEXTURE;
|
||||||
|
|
||||||
auto texture = new Texture2D;
|
auto texture = new Texture2D;
|
||||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
|
|
||||||
if (_fontDefinition._shadow._shadowEnabled || _fontDefinition._stroke._strokeEnabled)
|
|
||||||
{
|
|
||||||
CCLOGERROR("Currently only supported on iOS and Android!");
|
|
||||||
}
|
|
||||||
_fontDefinition._shadow._shadowEnabled = false;
|
|
||||||
_fontDefinition._stroke._strokeEnabled = false;
|
|
||||||
#endif
|
|
||||||
texture->initWithString(_originalUTF8String.c_str(),_fontDefinition);
|
texture->initWithString(_originalUTF8String.c_str(),_fontDefinition);
|
||||||
|
|
||||||
_textSprite = Sprite::createWithTexture(texture);
|
_textSprite = Sprite::createWithTexture(texture);
|
||||||
|
@ -1016,11 +928,29 @@ void Label::createSpriteWithFontDefinition()
|
||||||
_textSprite->updateDisplayedColor(_displayedColor);
|
_textSprite->updateDisplayedColor(_displayedColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Label::setFontDefinition(const FontDefinition& textDefinition)
|
||||||
|
{
|
||||||
|
_fontDefinition = textDefinition;
|
||||||
|
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
|
||||||
|
if (_fontDefinition._stroke._strokeEnabled)
|
||||||
|
{
|
||||||
|
CCLOGERROR("Currently only supported on iOS and Android!");
|
||||||
|
}
|
||||||
|
_fontDefinition._stroke._strokeEnabled = false;
|
||||||
|
#endif
|
||||||
|
if (_fontDefinition._shadow._shadowEnabled)
|
||||||
|
{
|
||||||
|
_fontDefinition._shadow._shadowEnabled = false;
|
||||||
|
enableShadow(Color4B(0,0,0,255 * _fontDefinition._shadow._shadowOpacity),_fontDefinition._shadow._shadowOffset,_fontDefinition._shadow._shadowBlur);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Label::updateContent()
|
void Label::updateContent()
|
||||||
{
|
{
|
||||||
auto utf16String = cc_utf8_to_utf16(_originalUTF8String.c_str());
|
auto utf16String = cc_utf8_to_utf16(_originalUTF8String.c_str());
|
||||||
setCurrentString(utf16String);
|
setCurrentString(utf16String);
|
||||||
setOriginalString(utf16String);
|
setOriginalString(utf16String);
|
||||||
|
|
||||||
if (_textSprite)
|
if (_textSprite)
|
||||||
{
|
{
|
||||||
Node::removeChild(_textSprite,true);
|
Node::removeChild(_textSprite,true);
|
||||||
|
@ -1031,16 +961,49 @@ void Label::updateContent()
|
||||||
_shadowNode = nullptr;
|
_shadowNode = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_fontAtlas)
|
if (_fontAtlas)
|
||||||
{
|
{
|
||||||
alignText();
|
alignText();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
_fontDefinition._fontName = _systemFont;
|
||||||
|
_fontDefinition._fontSize = _systemFontSize;
|
||||||
|
|
||||||
|
_fontDefinition._alignment = _hAlignment;
|
||||||
|
_fontDefinition._vertAlignment = _vAlignment;
|
||||||
|
|
||||||
|
_fontDefinition._dimensions.width = _labelWidth;
|
||||||
|
_fontDefinition._dimensions.height = _labelHeight;
|
||||||
|
|
||||||
_fontDefinition._fontFillColor.r = _textColor.r;
|
_fontDefinition._fontFillColor.r = _textColor.r;
|
||||||
_fontDefinition._fontFillColor.g = _textColor.g;
|
_fontDefinition._fontFillColor.g = _textColor.g;
|
||||||
_fontDefinition._fontFillColor.b = _textColor.b;
|
_fontDefinition._fontFillColor.b = _textColor.b;
|
||||||
|
|
||||||
|
_fontDefinition._shadow._shadowEnabled = false;
|
||||||
|
|
||||||
|
if (_currLabelEffect == LabelEffect::OUTLINE && _outlineSize > 0)
|
||||||
|
{
|
||||||
|
_fontDefinition._stroke._strokeEnabled = true;
|
||||||
|
_fontDefinition._stroke._strokeSize = _outlineSize;
|
||||||
|
_fontDefinition._stroke._strokeColor.r = _effectColor.r;
|
||||||
|
_fontDefinition._stroke._strokeColor.g = _effectColor.g;
|
||||||
|
_fontDefinition._stroke._strokeColor.b = _effectColor.b;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_fontDefinition._stroke._strokeEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
|
||||||
|
if (_fontDefinition._stroke._strokeEnabled)
|
||||||
|
{
|
||||||
|
CCLOGERROR("Currently only supported on iOS and Android!");
|
||||||
|
}
|
||||||
|
_fontDefinition._stroke._strokeEnabled = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
createSpriteWithFontDefinition();
|
createSpriteWithFontDefinition();
|
||||||
}
|
}
|
||||||
_contentDirty = false;
|
_contentDirty = false;
|
||||||
|
@ -1048,14 +1011,15 @@ void Label::updateContent()
|
||||||
|
|
||||||
void Label::updateFont()
|
void Label::updateFont()
|
||||||
{
|
{
|
||||||
if (FileUtils::getInstance()->isFileExist(_fontName))
|
if (_fontAtlas)
|
||||||
{
|
{
|
||||||
_fontConfig.fontFilePath = _fontName;
|
_batchNodes.clear();
|
||||||
_fontConfig.fontSize = _fontSize;
|
_batchNodes.push_back(this);
|
||||||
setTTFConfig(_fontConfig);
|
|
||||||
|
FontAtlasCache::releaseFontAtlas(_fontAtlas);
|
||||||
|
_fontAtlas = nullptr;
|
||||||
}
|
}
|
||||||
_fontDefinition._fontName = _fontName;
|
|
||||||
_fontDefinition._fontSize = _fontSize;
|
|
||||||
_contentDirty = true;
|
_contentDirty = true;
|
||||||
_fontDirty = false;
|
_fontDirty = false;
|
||||||
}
|
}
|
||||||
|
@ -1064,18 +1028,7 @@ void Label::drawTextSprite(Renderer *renderer, bool parentTransformUpdated)
|
||||||
{
|
{
|
||||||
if (_fontDefinition._fontFillColor != _textColor)
|
if (_fontDefinition._fontFillColor != _textColor)
|
||||||
{
|
{
|
||||||
Node::removeChild(_textSprite,true);
|
updateContent();
|
||||||
_textSprite = nullptr;
|
|
||||||
if (_shadowNode)
|
|
||||||
{
|
|
||||||
Node::removeChild(_shadowNode,true);
|
|
||||||
_shadowNode = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
_fontDefinition._fontFillColor.r = _textColor.r;
|
|
||||||
_fontDefinition._fontFillColor.g = _textColor.g;
|
|
||||||
_fontDefinition._fontFillColor.b = _textColor.b;
|
|
||||||
createSpriteWithFontDefinition();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_shadowEnabled && _shadowNode == nullptr)
|
if (_shadowEnabled && _shadowNode == nullptr)
|
||||||
|
@ -1084,8 +1037,9 @@ void Label::drawTextSprite(Renderer *renderer, bool parentTransformUpdated)
|
||||||
if (_shadowNode)
|
if (_shadowNode)
|
||||||
{
|
{
|
||||||
if (_blendFuncDirty)
|
if (_blendFuncDirty)
|
||||||
|
{
|
||||||
_shadowNode->setBlendFunc(_blendFunc);
|
_shadowNode->setBlendFunc(_blendFunc);
|
||||||
|
}
|
||||||
_shadowNode->setAnchorPoint(Point::ANCHOR_BOTTOM_LEFT);
|
_shadowNode->setAnchorPoint(Point::ANCHOR_BOTTOM_LEFT);
|
||||||
_shadowNode->setColor(_shadowColor);
|
_shadowNode->setColor(_shadowColor);
|
||||||
_shadowNode->setOpacity(_shadowOpacity * _displayedOpacity);
|
_shadowNode->setOpacity(_shadowOpacity * _displayedOpacity);
|
||||||
|
@ -1162,41 +1116,33 @@ void Label::visit(Renderer *renderer, const Matrix &parentTransform, bool parent
|
||||||
setOrderOfArrival(0);
|
setOrderOfArrival(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label::setFontName(const std::string& fontName)
|
void Label::setSystemFontName(const std::string& systemFont)
|
||||||
{
|
{
|
||||||
if (fontName != _fontName)
|
if (systemFont != _systemFont)
|
||||||
{
|
{
|
||||||
_fontName = fontName;
|
_systemFont = systemFont;
|
||||||
_fontDirty = true;
|
_fontDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& Label::getFontName() const
|
void Label::setSystemFontSize(float fontSize)
|
||||||
{
|
{
|
||||||
return _fontName;
|
if (_systemFontSize != fontSize)
|
||||||
}
|
|
||||||
|
|
||||||
void Label::setFontSize(float fontSize)
|
|
||||||
{
|
|
||||||
if (_fontSize != fontSize)
|
|
||||||
{
|
{
|
||||||
_fontSize = fontSize;
|
_systemFontSize = fontSize;
|
||||||
_fontDirty = true;
|
_fontDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float Label::getFontSize() const
|
|
||||||
{
|
|
||||||
return _fontSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
///// PROTOCOL STUFF
|
///// PROTOCOL STUFF
|
||||||
Sprite * Label::getLetter(int letterIndex)
|
Sprite * Label::getLetter(int letterIndex)
|
||||||
{
|
{
|
||||||
if (_fontDirty)
|
if (_fontDirty)
|
||||||
{
|
{
|
||||||
updateFont();
|
updateFont();
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_contentDirty)
|
if (_contentDirty)
|
||||||
{
|
{
|
||||||
updateContent();
|
updateContent();
|
||||||
|
@ -1385,26 +1331,6 @@ Rect Label::getBoundingBox() const
|
||||||
return Node::getBoundingBox();
|
return Node::getBoundingBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label::listenToBackground(EventCustom *event)
|
|
||||||
{
|
|
||||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
|
||||||
if (_fontAtlas && _currentLabelType == LabelType::TTF)
|
|
||||||
{
|
|
||||||
_batchNodes.clear();
|
|
||||||
_batchNodes.push_back(this);
|
|
||||||
Node::removeAllChildrenWithCleanup(true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void Label::listenToFontAtlasPurge(EventCustom *event)
|
|
||||||
{
|
|
||||||
if (_fontAtlas && _currentLabelType == LabelType::TTF && event->getUserData() == _fontAtlas)
|
|
||||||
{
|
|
||||||
alignText();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Label::setBlendFunc(const BlendFunc &blendFunc)
|
void Label::setBlendFunc(const BlendFunc &blendFunc)
|
||||||
{
|
{
|
||||||
_blendFunc = blendFunc;
|
_blendFunc = blendFunc;
|
||||||
|
|
|
@ -82,18 +82,26 @@ public:
|
||||||
|
|
||||||
static Label* create();
|
static Label* create();
|
||||||
|
|
||||||
/** creates a Label from a font name, horizontal alignment, dimension in points, and font size in points.
|
/** Creates a label with an initial string,font[font name or font file],font size, dimension in points, horizontal alignment and vertical alignment.
|
||||||
* @warning It will generate texture by the platform-dependent code if [fontName] not a font file.
|
* @warning It will generate texture by the platform-dependent code
|
||||||
*/
|
*/
|
||||||
static Label * create(const std::string& text, const std::string& fontName, float fontSize,
|
static Label* createWithSystemFont(const std::string& text, const std::string& font, float fontSize,
|
||||||
const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT,
|
const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT,
|
||||||
TextVAlignment vAlignment = TextVAlignment::TOP);
|
TextVAlignment vAlignment = TextVAlignment::TOP);
|
||||||
|
|
||||||
/** create a label with TTF configuration
|
/** Creates a label with an initial string,font file,font size, dimension in points, horizontal alignment and vertical alignment.
|
||||||
* It will generate texture of character by freetype.
|
* @warning Not support font name.
|
||||||
|
*/
|
||||||
|
static Label * createWithTTF(const std::string& text, const std::string& fontFile, float fontSize,
|
||||||
|
const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT,
|
||||||
|
TextVAlignment vAlignment = TextVAlignment::TOP);
|
||||||
|
|
||||||
|
/** Create a label with TTF configuration
|
||||||
|
* @warning Not support font name.
|
||||||
*/
|
*/
|
||||||
static Label* createWithTTF(const TTFConfig& ttfConfig, const std::string& text, TextHAlignment alignment = TextHAlignment::LEFT, int maxLineWidth = 0);
|
static Label* createWithTTF(const TTFConfig& ttfConfig, const std::string& text, TextHAlignment alignment = TextHAlignment::LEFT, int maxLineWidth = 0);
|
||||||
|
|
||||||
|
/* Creates a label with an FNT file,an initial string,horizontal alignment,max line width and the offset of image*/
|
||||||
static Label* createWithBMFont(const std::string& bmfontFilePath, const std::string& text,
|
static Label* createWithBMFont(const std::string& bmfontFilePath, const std::string& text,
|
||||||
const TextHAlignment& alignment = TextHAlignment::LEFT, int maxLineWidth = 0,
|
const TextHAlignment& alignment = TextHAlignment::LEFT, int maxLineWidth = 0,
|
||||||
const Point& imageOffset = Point::ZERO);
|
const Point& imageOffset = Point::ZERO);
|
||||||
|
@ -102,14 +110,9 @@ public:
|
||||||
static Label * createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap);
|
static Label * createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap);
|
||||||
static Label * createWithCharMap(const std::string& plistFile);
|
static Label * createWithCharMap(const std::string& plistFile);
|
||||||
|
|
||||||
/** create a lable with string and a font definition
|
|
||||||
* @warning It will generate texture by the platform-dependent code and create Sprite for show text.
|
|
||||||
* To obtain better performance use createWithTTF/createWithBMFont/createWithCharMap
|
|
||||||
*/
|
|
||||||
static Label * createWithFontDefinition(const std::string& text, const FontDefinition &textDefinition);
|
|
||||||
|
|
||||||
/** set TTF configuration for Label */
|
/** set TTF configuration for Label */
|
||||||
virtual bool setTTFConfig(const TTFConfig& ttfConfig);
|
virtual bool setTTFConfig(const TTFConfig& ttfConfig);
|
||||||
|
virtual const TTFConfig& getTTFConfig() const { return _fontConfig;}
|
||||||
|
|
||||||
virtual bool setBMFontFilePath(const std::string& bmfontFilePath, const Point& imageOffset = Point::ZERO);
|
virtual bool setBMFontFilePath(const std::string& bmfontFilePath, const Point& imageOffset = Point::ZERO);
|
||||||
const std::string& getBMFontFilePath() const { return _bmFontPath;}
|
const std::string& getBMFontFilePath() const { return _bmFontPath;}
|
||||||
|
@ -118,13 +121,13 @@ public:
|
||||||
virtual bool setCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap);
|
virtual bool setCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap);
|
||||||
virtual bool setCharMap(const std::string& plistFile);
|
virtual bool setCharMap(const std::string& plistFile);
|
||||||
|
|
||||||
/** set the text definition used by this label
|
/* Sets the system font[font name or font file] of label*/
|
||||||
* It will create Sprite for show text if you haven't set up using TTF/BMFont/CharMap.
|
virtual void setSystemFontName(const std::string& systemFont);
|
||||||
*/
|
virtual const std::string& getSystemFontName() const { return _systemFont;}
|
||||||
virtual void setFontDefinition(const FontDefinition& textDefinition);
|
|
||||||
|
|
||||||
/** get the text definition used by this label */
|
/* Sets the system font size of label.*/
|
||||||
const FontDefinition& getFontDefinition() const { return _fontDefinition; }
|
virtual void setSystemFontSize(float fontSize);
|
||||||
|
virtual float getSystemFontSize() const { return _systemFontSize;}
|
||||||
|
|
||||||
/** changes the string to render
|
/** changes the string to render
|
||||||
* @warning It is as expensive as changing the string if you haven't set up TTF/BMFont/CharMap for the label.
|
* @warning It is as expensive as changing the string if you haven't set up TTF/BMFont/CharMap for the label.
|
||||||
|
@ -190,12 +193,6 @@ public:
|
||||||
/** update content immediately.*/
|
/** update content immediately.*/
|
||||||
virtual void updateContent();
|
virtual void updateContent();
|
||||||
|
|
||||||
virtual void setFontName(const std::string& fontName);
|
|
||||||
virtual const std::string& getFontName() const;
|
|
||||||
|
|
||||||
virtual void setFontSize(float fontSize);
|
|
||||||
virtual float getFontSize() const;
|
|
||||||
|
|
||||||
/** Sets the text color
|
/** Sets the text color
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -243,22 +240,13 @@ public:
|
||||||
virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override;
|
virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override;
|
||||||
virtual void draw(Renderer *renderer, const Matrix &transform, bool transformUpdated) override;
|
virtual void draw(Renderer *renderer, const Matrix &transform, bool transformUpdated) override;
|
||||||
|
|
||||||
/** Listen "come to background" message
|
CC_DEPRECATED_ATTRIBUTE static Label* create(const std::string& text, const std::string& font, float fontSize,
|
||||||
It only has effect on Android.
|
const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT,
|
||||||
*/
|
TextVAlignment vAlignment = TextVAlignment::TOP);
|
||||||
void listenToBackground(EventCustom *event);
|
|
||||||
|
|
||||||
/** Listen "FontAtlas purge textures" message
|
CC_DEPRECATED_ATTRIBUTE virtual void setFontDefinition(const FontDefinition& textDefinition);
|
||||||
*/
|
CC_DEPRECATED_ATTRIBUTE const FontDefinition& getFontDefinition() const { return _fontDefinition; }
|
||||||
void listenToFontAtlasPurge(EventCustom *event);
|
|
||||||
|
|
||||||
CC_DEPRECATED_ATTRIBUTE static Label* createWithTTF(const std::string& label, const std::string& fontFilePath,
|
|
||||||
int fontSize, int maxLineWidth = 0, TextHAlignment alignment = TextHAlignment::LEFT,
|
|
||||||
GlyphCollection glyphs = GlyphCollection::DYNAMIC, const char *customGlyphs = 0, bool useDistanceField = false);
|
|
||||||
|
|
||||||
CC_DEPRECATED_ATTRIBUTE int getStringLenght() const { return getStringLength(); }
|
|
||||||
|
|
||||||
CC_DEPRECATED_ATTRIBUTE void setLabelEffect(LabelEffect effect,const Color3B& effectColor);
|
|
||||||
protected:
|
protected:
|
||||||
void onDraw(const Matrix& transform, bool transformUpdated);
|
void onDraw(const Matrix& transform, bool transformUpdated);
|
||||||
|
|
||||||
|
@ -322,9 +310,10 @@ protected:
|
||||||
|
|
||||||
bool _isOpacityModifyRGB;
|
bool _isOpacityModifyRGB;
|
||||||
bool _contentDirty;
|
bool _contentDirty;
|
||||||
|
|
||||||
bool _fontDirty;
|
bool _fontDirty;
|
||||||
std::string _fontName;
|
std::string _systemFont;
|
||||||
float _fontSize;
|
float _systemFontSize;
|
||||||
LabelType _currentLabelType;
|
LabelType _currentLabelType;
|
||||||
|
|
||||||
std::vector<SpriteBatchNode*> _batchNodes;
|
std::vector<SpriteBatchNode*> _batchNodes;
|
||||||
|
@ -380,6 +369,8 @@ protected:
|
||||||
float _shadowOpacity;
|
float _shadowOpacity;
|
||||||
Sprite* _shadowNode;
|
Sprite* _shadowNode;
|
||||||
|
|
||||||
|
int _outlineSize;
|
||||||
|
|
||||||
Color4B _textColor;
|
Color4B _textColor;
|
||||||
Color4F _textColorF;
|
Color4F _textColorF;
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,10 @@ THE SOFTWARE.
|
||||||
#include "ccGLStateCache.h"
|
#include "ccGLStateCache.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "TransformUtils.h"
|
#include "TransformUtils.h"
|
||||||
#include "CCInteger.h"
|
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
// external
|
// external
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ http://www.angelcode.com/products/bmfont/ (Free, Windows only)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCLabelBMFont.h"
|
#include "CCLabelBMFont.h"
|
||||||
#include "CCDrawingPrimitives.h"
|
#include "CCDrawingPrimitives.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCSprite.h"
|
#include "CCSprite.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCLabelTTF.h"
|
#include "CCLabelTTF.h"
|
||||||
#include "CCLabel.h"
|
#include "CCLabel.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
@ -97,10 +97,10 @@ bool LabelTTF::initWithString(const std::string& string, const std::string& font
|
||||||
TextVAlignment vAlignment)
|
TextVAlignment vAlignment)
|
||||||
{
|
{
|
||||||
_renderLabel->setString(string);
|
_renderLabel->setString(string);
|
||||||
_renderLabel->setFontSize(fontSize);
|
_renderLabel->setSystemFontSize(fontSize);
|
||||||
_renderLabel->setDimensions(dimensions.width,dimensions.height);
|
_renderLabel->setDimensions(dimensions.width,dimensions.height);
|
||||||
_renderLabel->setAlignment(hAlignment,vAlignment);
|
_renderLabel->setAlignment(hAlignment,vAlignment);
|
||||||
_renderLabel->setFontName(fontName);
|
_renderLabel->setSystemFontName(fontName);
|
||||||
_contentDirty = true;
|
_contentDirty = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -128,7 +128,7 @@ const std::string& LabelTTF::getString() const
|
||||||
|
|
||||||
std::string LabelTTF::getDescription() const
|
std::string LabelTTF::getDescription() const
|
||||||
{
|
{
|
||||||
return StringUtils::format("<LabelTTF | FontName = %s, FontSize = %f, Label = '%s'>", _renderLabel->getFontName().c_str(), _renderLabel->getFontSize(), _renderLabel->getString().c_str());
|
return StringUtils::format("<LabelTTF | FontName = %s, FontSize = %f, Label = '%s'>", _renderLabel->getSystemFontName().c_str(), _renderLabel->getSystemFontSize(), _renderLabel->getString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TextHAlignment LabelTTF::getHorizontalAlignment() const
|
TextHAlignment LabelTTF::getHorizontalAlignment() const
|
||||||
|
@ -166,23 +166,23 @@ void LabelTTF::setDimensions(const Size &dim)
|
||||||
|
|
||||||
float LabelTTF::getFontSize() const
|
float LabelTTF::getFontSize() const
|
||||||
{
|
{
|
||||||
return _renderLabel->getFontSize();
|
return _renderLabel->getSystemFontSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabelTTF::setFontSize(float fontSize)
|
void LabelTTF::setFontSize(float fontSize)
|
||||||
{
|
{
|
||||||
_renderLabel->setFontSize(fontSize);
|
_renderLabel->setSystemFontSize(fontSize);
|
||||||
_contentDirty = true;
|
_contentDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& LabelTTF::getFontName() const
|
const std::string& LabelTTF::getFontName() const
|
||||||
{
|
{
|
||||||
return _renderLabel->getFontName();
|
return _renderLabel->getSystemFontName();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabelTTF::setFontName(const std::string& fontName)
|
void LabelTTF::setFontName(const std::string& fontName)
|
||||||
{
|
{
|
||||||
_renderLabel->setFontName(fontName);
|
_renderLabel->setSystemFontName(fontName);
|
||||||
_contentDirty = true;
|
_contentDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ THE SOFTWARE.
|
||||||
#include "CCScene.h"
|
#include "CCScene.h"
|
||||||
#include "renderer/CCCustomCommand.h"
|
#include "renderer/CCCustomCommand.h"
|
||||||
#include "renderer/CCRenderer.h"
|
#include "renderer/CCRenderer.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ NS_CC_BEGIN
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
class __Set;
|
||||||
class TouchScriptHandlerEntry;
|
class TouchScriptHandlerEntry;
|
||||||
|
|
||||||
class EventListenerTouch;
|
class EventListenerTouch;
|
||||||
|
@ -77,10 +78,10 @@ public:
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(__Set *pTouches, Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(__Set *pTouches, Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(__Set *pTouches, Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(__Set *pTouches, Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
||||||
|
|
||||||
/* Callback function should not be deprecated, it will generate lots of warnings.
|
/* Callback function should not be deprecated, it will generate lots of warnings.
|
||||||
Since 'setTouchEnabled' was deprecated, it will make warnings if developer overrides onTouchXXX and invokes setTouchEnabled(true) instead of using EventDispatcher::addEventListenerWithXXX.
|
Since 'setTouchEnabled' was deprecated, it will make warnings if developer overrides onTouchXXX and invokes setTouchEnabled(true) instead of using EventDispatcher::addEventListenerWithXXX.
|
||||||
*/
|
*/
|
||||||
virtual bool onTouchBegan(Touch *touch, Event *unused_event);
|
virtual bool onTouchBegan(Touch *touch, Event *unused_event);
|
||||||
virtual void onTouchMoved(Touch *touch, Event *unused_event);
|
virtual void onTouchMoved(Touch *touch, Event *unused_event);
|
||||||
virtual void onTouchEnded(Touch *touch, Event *unused_event);
|
virtual void onTouchEnded(Touch *touch, Event *unused_event);
|
||||||
virtual void onTouchCancelled(Touch *touch, Event *unused_event);
|
virtual void onTouchCancelled(Touch *touch, Event *unused_event);
|
||||||
|
|
|
@ -28,9 +28,8 @@ THE SOFTWARE.
|
||||||
#include "CCApplication.h"
|
#include "CCApplication.h"
|
||||||
#include "CCTouch.h"
|
#include "CCTouch.h"
|
||||||
#include "CCStdC.h"
|
#include "CCStdC.h"
|
||||||
#include "CCInteger.h"
|
|
||||||
#include "CCEventListenerTouch.h"
|
#include "CCEventListenerTouch.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
|
@ -31,6 +31,7 @@ THE SOFTWARE.
|
||||||
#include "CCLabelAtlas.h"
|
#include "CCLabelAtlas.h"
|
||||||
#include "CCLabel.h"
|
#include "CCLabel.h"
|
||||||
#include "CCScriptSupport.h"
|
#include "CCScriptSupport.h"
|
||||||
|
#include "deprecated/CCString.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
@ -439,7 +440,7 @@ bool MenuItemFont::initWithString(const std::string& value, const ccMenuCallback
|
||||||
_fontName = _globalFontName;
|
_fontName = _globalFontName;
|
||||||
_fontSize = _globalFontSize;
|
_fontSize = _globalFontSize;
|
||||||
|
|
||||||
Label *label = Label::create(value, _fontName, _fontSize);
|
Label *label = Label::createWithSystemFont(value, _fontName, _fontSize);
|
||||||
if (MenuItemLabel::initWithLabel(label, callback))
|
if (MenuItemLabel::initWithLabel(label, callback))
|
||||||
{
|
{
|
||||||
// do something ?
|
// do something ?
|
||||||
|
@ -450,7 +451,7 @@ bool MenuItemFont::initWithString(const std::string& value, const ccMenuCallback
|
||||||
void MenuItemFont::setFontSizeObj(int s)
|
void MenuItemFont::setFontSizeObj(int s)
|
||||||
{
|
{
|
||||||
_fontSize = s;
|
_fontSize = s;
|
||||||
dynamic_cast<Label*>(_label)->setFontSize(_fontSize);
|
dynamic_cast<Label*>(_label)->setSystemFontSize(_fontSize);
|
||||||
this->setContentSize(dynamic_cast<Label*>(_label)->getContentSize());
|
this->setContentSize(dynamic_cast<Label*>(_label)->getContentSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -462,7 +463,7 @@ int MenuItemFont::getFontSizeObj() const
|
||||||
void MenuItemFont::setFontNameObj(const std::string& name)
|
void MenuItemFont::setFontNameObj(const std::string& name)
|
||||||
{
|
{
|
||||||
_fontName = name;
|
_fontName = name;
|
||||||
dynamic_cast<Label*>(_label)->setFontName(_fontName);
|
dynamic_cast<Label*>(_label)->setSystemFontName(_fontName);
|
||||||
this->setContentSize(dynamic_cast<Label*>(_label)->getContentSize());
|
this->setContentSize(dynamic_cast<Label*>(_label)->getContentSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ THE SOFTWARE.
|
||||||
// cocos2d includes
|
// cocos2d includes
|
||||||
#include "CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCProtocols.h"
|
#include "CCProtocols.h"
|
||||||
#include "CCArray.h"
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "ccCArray.h"
|
#include "ccCArray.h"
|
||||||
#include "TransformUtils.h"
|
#include "TransformUtils.h"
|
||||||
#include "CCGrid.h"
|
#include "CCGrid.h"
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "CCAffineTransform.h"
|
#include "CCAffineTransform.h"
|
||||||
#include "CCArray.h"
|
|
||||||
#include "CCGL.h"
|
#include "CCGL.h"
|
||||||
#include "ccGLStateCache.h"
|
#include "ccGLStateCache.h"
|
||||||
#include "CCGLProgram.h"
|
#include "CCGLProgram.h"
|
||||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
||||||
#include "CCProtocols.h"
|
#include "CCProtocols.h"
|
||||||
#include "CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCValue.h"
|
#include "CCValue.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ THE SOFTWARE.
|
||||||
#include "CCSprite.h"
|
#include "CCSprite.h"
|
||||||
#include "CCSpriteBatchNode.h"
|
#include "CCSpriteBatchNode.h"
|
||||||
#include "CCPhysicsWorld.h"
|
#include "CCPhysicsWorld.h"
|
||||||
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ THE SOFTWARE.
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "utlist.h"
|
#include "utlist.h"
|
||||||
#include "ccCArray.h"
|
#include "ccCArray.h"
|
||||||
#include "CCArray.h"
|
|
||||||
#include "CCScriptSupport.h"
|
#include "CCScriptSupport.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "CCTouch.h"
|
#include "CCTouch.h"
|
||||||
#include "CCEventTouch.h"
|
#include "CCEventTouch.h"
|
||||||
#include "CCEventKeyboard.h"
|
#include "CCEventKeyboard.h"
|
||||||
#include "CCSet.h"
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
|
@ -24,14 +24,11 @@ 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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
#include "CCSprite.h"
|
||||||
#include "CCSpriteBatchNode.h"
|
#include "CCSpriteBatchNode.h"
|
||||||
#include <string.h>
|
|
||||||
#include <algorithm>
|
|
||||||
#include "CCAnimation.h"
|
#include "CCAnimation.h"
|
||||||
#include "CCAnimationCache.h"
|
#include "CCAnimationCache.h"
|
||||||
#include "ccConfig.h"
|
#include "ccConfig.h"
|
||||||
#include "CCSprite.h"
|
|
||||||
#include "CCSpriteFrame.h"
|
#include "CCSpriteFrame.h"
|
||||||
#include "CCSpriteFrameCache.h"
|
#include "CCSpriteFrameCache.h"
|
||||||
#include "CCTextureCache.h"
|
#include "CCTextureCache.h"
|
||||||
|
@ -52,9 +49,10 @@ THE SOFTWARE.
|
||||||
// external
|
// external
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
#include "kazmath/kazmath.h"
|
#include "kazmath/kazmath.h"
|
||||||
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
using namespace std;
|
#include <algorithm>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ THE SOFTWARE.
|
||||||
#include "CCProtocols.h"
|
#include "CCProtocols.h"
|
||||||
#include "CCTextureAtlas.h"
|
#include "CCTextureAtlas.h"
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
#include "CCDictionary.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#ifdef EMSCRIPTEN
|
#ifdef EMSCRIPTEN
|
||||||
#include "CCGLBufferedNode.h"
|
#include "CCGLBufferedNode.h"
|
||||||
|
|
|
@ -27,9 +27,6 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCSpriteBatchNode.h"
|
#include "CCSpriteBatchNode.h"
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
#include "ccConfig.h"
|
#include "ccConfig.h"
|
||||||
#include "CCSprite.h"
|
#include "CCSprite.h"
|
||||||
#include "CCGrid.h"
|
#include "CCGrid.h"
|
||||||
|
@ -48,6 +45,10 @@ THE SOFTWARE.
|
||||||
// external
|
// external
|
||||||
#include "kazmath/GL/matrix.h"
|
#include "kazmath/GL/matrix.h"
|
||||||
|
|
||||||
|
#include "deprecated/CCString.h" // For StringUtils::format
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -77,28 +77,7 @@ public:
|
||||||
The file will be loaded using the TextureMgr.
|
The file will be loaded using the TextureMgr.
|
||||||
*/
|
*/
|
||||||
static SpriteBatchNode* create(const std::string& fileImage, ssize_t capacity = DEFAULT_CAPACITY);
|
static SpriteBatchNode* create(const std::string& fileImage, ssize_t capacity = DEFAULT_CAPACITY);
|
||||||
/**
|
|
||||||
* @js ctor
|
|
||||||
*/
|
|
||||||
SpriteBatchNode();
|
|
||||||
/**
|
|
||||||
* @js NA
|
|
||||||
* @lua NA
|
|
||||||
*/
|
|
||||||
virtual ~SpriteBatchNode();
|
|
||||||
|
|
||||||
/** initializes a SpriteBatchNode with a texture2d and capacity of children.
|
|
||||||
The capacity will be increased in 33% in runtime if it run out of space.
|
|
||||||
*/
|
|
||||||
bool initWithTexture(Texture2D *tex, ssize_t capacity);
|
|
||||||
/** initializes a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and a capacity of children.
|
|
||||||
The capacity will be increased in 33% in runtime if it run out of space.
|
|
||||||
The file will be loaded using the TextureMgr.
|
|
||||||
* @js init
|
|
||||||
* @lua init
|
|
||||||
*/
|
|
||||||
bool initWithFile(const std::string& fileImage, ssize_t capacity);
|
|
||||||
bool init();
|
|
||||||
|
|
||||||
/** returns the TextureAtlas object */
|
/** returns the TextureAtlas object */
|
||||||
inline TextureAtlas* getTextureAtlas(void) { return _textureAtlas; }
|
inline TextureAtlas* getTextureAtlas(void) { return _textureAtlas; }
|
||||||
|
@ -176,6 +155,31 @@ public:
|
||||||
It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas
|
It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas
|
||||||
*/
|
*/
|
||||||
SpriteBatchNode * addSpriteWithoutQuad(Sprite *child, int z, int aTag);
|
SpriteBatchNode * addSpriteWithoutQuad(Sprite *child, int z, int aTag);
|
||||||
|
|
||||||
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
/**
|
||||||
|
* @js ctor
|
||||||
|
*/
|
||||||
|
SpriteBatchNode();
|
||||||
|
/**
|
||||||
|
* @js NA
|
||||||
|
* @lua NA
|
||||||
|
*/
|
||||||
|
virtual ~SpriteBatchNode();
|
||||||
|
|
||||||
|
/** initializes a SpriteBatchNode with a texture2d and capacity of children.
|
||||||
|
The capacity will be increased in 33% in runtime if it run out of space.
|
||||||
|
*/
|
||||||
|
bool initWithTexture(Texture2D *tex, ssize_t capacity);
|
||||||
|
/** initializes a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and a capacity of children.
|
||||||
|
The capacity will be increased in 33% in runtime if it run out of space.
|
||||||
|
The file will be loaded using the TextureMgr.
|
||||||
|
* @js init
|
||||||
|
* @lua init
|
||||||
|
*/
|
||||||
|
bool initWithFile(const std::string& fileImage, ssize_t capacity);
|
||||||
|
bool init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Updates a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
|
/** Updates a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
|
||||||
This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
|
This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
|
||||||
|
|
|
@ -35,9 +35,7 @@ THE SOFTWARE.
|
||||||
#include "CCSprite.h"
|
#include "CCSprite.h"
|
||||||
#include "TransformUtils.h"
|
#include "TransformUtils.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCArray.h"
|
|
||||||
#include "CCDictionary.h"
|
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@ THE SOFTWARE.
|
||||||
#include "ccCArray.h"
|
#include "ccCArray.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
|
|
||||||
|
#include "deprecated/CCString.h" // For StringUtils::format
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ THE SOFTWARE.
|
||||||
#include "CCTMXXMLParser.h"
|
#include "CCTMXXMLParser.h"
|
||||||
#include "CCTMXLayer.h"
|
#include "CCTMXLayer.h"
|
||||||
#include "CCSprite.h"
|
#include "CCSprite.h"
|
||||||
|
#include "deprecated/CCString.h" // For StringUtils::format
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -111,8 +111,8 @@ bool TextFieldTTF::initWithPlaceHolder(const std::string& placeholder, const Siz
|
||||||
{
|
{
|
||||||
_placeHolder = placeholder;
|
_placeHolder = placeholder;
|
||||||
setDimensions(dimensions.width,dimensions.height);
|
setDimensions(dimensions.width,dimensions.height);
|
||||||
setFontName(fontName);
|
setSystemFontName(fontName);
|
||||||
setFontSize(fontSize);
|
setSystemFontSize(fontSize);
|
||||||
setAlignment(alignment,TextVAlignment::CENTER);
|
setAlignment(alignment,TextVAlignment::CENTER);
|
||||||
Label::setTextColor(_colorSpaceHolder);
|
Label::setTextColor(_colorSpaceHolder);
|
||||||
Label::setString(_placeHolder);
|
Label::setString(_placeHolder);
|
||||||
|
@ -122,8 +122,8 @@ bool TextFieldTTF::initWithPlaceHolder(const std::string& placeholder, const Siz
|
||||||
bool TextFieldTTF::initWithPlaceHolder(const std::string& placeholder, const std::string& fontName, float fontSize)
|
bool TextFieldTTF::initWithPlaceHolder(const std::string& placeholder, const std::string& fontName, float fontSize)
|
||||||
{
|
{
|
||||||
_placeHolder = std::string(placeholder);
|
_placeHolder = std::string(placeholder);
|
||||||
setFontName(fontName);
|
setSystemFontName(fontName);
|
||||||
setFontSize(fontSize);
|
setSystemFontSize(fontSize);
|
||||||
Label::setTextColor(_colorSpaceHolder);
|
Label::setTextColor(_colorSpaceHolder);
|
||||||
Label::setString(_placeHolder);
|
Label::setString(_placeHolder);
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ THE SOFTWARE.
|
||||||
#include "ccGLStateCache.h"
|
#include "ccGLStateCache.h"
|
||||||
#include "CCShaderCache.h"
|
#include "CCShaderCache.h"
|
||||||
#include "platform/CCDevice.h"
|
#include "platform/CCDevice.h"
|
||||||
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||||
#include "CCTextureCache.h"
|
#include "CCTextureCache.h"
|
||||||
|
|
|
@ -39,7 +39,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
// support
|
// support
|
||||||
#include "CCTexture2D.h"
|
#include "CCTexture2D.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "CCEventDispatcher.h"
|
#include "CCEventDispatcher.h"
|
||||||
#include "CCEventListenerCustom.h"
|
#include "CCEventListenerCustom.h"
|
||||||
|
|
|
@ -37,7 +37,7 @@ THE SOFTWARE.
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
#include "ccUtils.h"
|
#include "ccUtils.h"
|
||||||
#include "CCScheduler.h"
|
#include "CCScheduler.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef EMSCRIPTEN
|
#ifdef EMSCRIPTEN
|
||||||
|
|
|
@ -29,9 +29,8 @@ THE SOFTWARE.
|
||||||
#include "CCTextureAtlas.h"
|
#include "CCTextureAtlas.h"
|
||||||
#include "TGAlib.h"
|
#include "TGAlib.h"
|
||||||
#include "ccConfig.h"
|
#include "ccConfig.h"
|
||||||
#include "CCInteger.h"
|
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -42,12 +42,18 @@ NS_CC_BEGIN
|
||||||
const unsigned int kSceneFade = 0xFADEFADE;
|
const unsigned int kSceneFade = 0xFADEFADE;
|
||||||
|
|
||||||
TransitionScene::TransitionScene()
|
TransitionScene::TransitionScene()
|
||||||
|
: _inScene(nullptr)
|
||||||
|
, _outScene(nullptr)
|
||||||
|
, _duration(0.0f)
|
||||||
|
, _isInSceneOnTop(false)
|
||||||
|
, _isSendCleanupToScene(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TransitionScene::~TransitionScene()
|
TransitionScene::~TransitionScene()
|
||||||
{
|
{
|
||||||
_inScene->release();
|
CC_SAFE_RELEASE(_inScene);
|
||||||
_outScene->release();
|
CC_SAFE_RELEASE(_outScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
TransitionScene * TransitionScene::create(float t, Scene *scene)
|
TransitionScene * TransitionScene::create(float t, Scene *scene)
|
||||||
|
|
|
@ -103,7 +103,6 @@ set(COCOS2D_SRC
|
||||||
base64.cpp
|
base64.cpp
|
||||||
ccUtils.cpp
|
ccUtils.cpp
|
||||||
CCVertex.cpp
|
CCVertex.cpp
|
||||||
CCNotificationCenter.cpp
|
|
||||||
TGAlib.cpp
|
TGAlib.cpp
|
||||||
ZipUtils.cpp
|
ZipUtils.cpp
|
||||||
ccCArray.cpp
|
ccCArray.cpp
|
||||||
|
@ -130,13 +129,11 @@ set(COCOS2D_SRC
|
||||||
ccFPSImages.c
|
ccFPSImages.c
|
||||||
ccTypes.cpp
|
ccTypes.cpp
|
||||||
cocos2d.cpp
|
cocos2d.cpp
|
||||||
CCDeprecated.cpp
|
|
||||||
platform/CCSAXParser.cpp
|
platform/CCSAXParser.cpp
|
||||||
platform/CCThread.cpp
|
platform/CCThread.cpp
|
||||||
platform/CCGLViewProtocol.cpp
|
platform/CCGLViewProtocol.cpp
|
||||||
platform/CCFileUtils.cpp
|
platform/CCFileUtils.cpp
|
||||||
platform/CCImage.cpp
|
platform/CCImage.cpp
|
||||||
../../external/edtaa3func/edtaa3func.cpp
|
|
||||||
renderer/CCCustomCommand.cpp
|
renderer/CCCustomCommand.cpp
|
||||||
renderer/CCFrustum.cpp
|
renderer/CCFrustum.cpp
|
||||||
renderer/CCGroupCommand.cpp
|
renderer/CCGroupCommand.cpp
|
||||||
|
@ -146,6 +143,9 @@ set(COCOS2D_SRC
|
||||||
renderer/CCRenderCommand.cpp
|
renderer/CCRenderCommand.cpp
|
||||||
renderer/CCRenderer.cpp
|
renderer/CCRenderer.cpp
|
||||||
renderer/CCRenderMaterial.cpp
|
renderer/CCRenderMaterial.cpp
|
||||||
|
../deprecated/CCDeprecated.cpp
|
||||||
|
../deprecated/CCNotificationCenter.cpp
|
||||||
|
../../external/edtaa3func/edtaa3func.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
include(../physics/CMakeLists.txt)
|
include(../physics/CMakeLists.txt)
|
||||||
|
|
|
@ -26,11 +26,10 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include "ccCArray.h"
|
#include "ccCArray.h"
|
||||||
#include "CCRef.h"
|
#include "CCRef.h"
|
||||||
|
#include "ccTypes.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
const ssize_t CC_INVALID_INDEX = -1;
|
|
||||||
|
|
||||||
/** Allocates and initializes a new array with specified capacity */
|
/** Allocates and initializes a new array with specified capacity */
|
||||||
ccArray* ccArrayNew(ssize_t capacity)
|
ccArray* ccArrayNew(ssize_t capacity)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,8 +52,6 @@ THE SOFTWARE.
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
extern const ssize_t CC_INVALID_INDEX;
|
|
||||||
|
|
||||||
// Easy integration
|
// Easy integration
|
||||||
#define CCARRAYDATA_FOREACH(__array__, __object__) \
|
#define CCARRAYDATA_FOREACH(__array__, __object__) \
|
||||||
__object__=__array__->arr[0]; for(ssize_t i=0, num=__array__->num; i<num; i++, __object__=__array__->arr[i]) \
|
__object__=__array__->arr[0]; for(ssize_t i=0, num=__array__->num; i<num; i++, __object__=__array__->arr[i]) \
|
||||||
|
|
|
@ -28,7 +28,9 @@ Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
const std::string STD_STRING_EMPTY("");
|
const std::string STD_STRING_EMPTY("");
|
||||||
|
const ssize_t CC_INVALID_INDEX = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Color3B
|
* Color3B
|
||||||
|
|
|
@ -476,6 +476,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const std::string STD_STRING_EMPTY;
|
extern const std::string STD_STRING_EMPTY;
|
||||||
|
extern const ssize_t CC_INVALID_INDEX;
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ NS_CC_BEGIN
|
||||||
|
|
||||||
const char* cocos2dVersion()
|
const char* cocos2dVersion()
|
||||||
{
|
{
|
||||||
return "3.0-rc1";
|
return "3.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
|
@ -59,19 +59,11 @@ THE SOFTWARE.
|
||||||
|
|
||||||
// cocoa
|
// cocoa
|
||||||
#include "CCAffineTransform.h"
|
#include "CCAffineTransform.h"
|
||||||
#include "CCDictionary.h"
|
|
||||||
#include "CCRef.h"
|
#include "CCRef.h"
|
||||||
#include "CCArray.h"
|
|
||||||
#include "CCVector.h"
|
#include "CCVector.h"
|
||||||
#include "CCMap.h"
|
#include "CCMap.h"
|
||||||
#include "CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
#include "CCSet.h"
|
|
||||||
#include "CCAutoreleasePool.h"
|
#include "CCAutoreleasePool.h"
|
||||||
#include "CCInteger.h"
|
|
||||||
#include "CCFloat.h"
|
|
||||||
#include "CCDouble.h"
|
|
||||||
#include "CCBool.h"
|
|
||||||
#include "CCString.h"
|
|
||||||
#include "CCNS.h"
|
#include "CCNS.h"
|
||||||
#include "CCData.h"
|
#include "CCData.h"
|
||||||
#include "CCValue.h"
|
#include "CCValue.h"
|
||||||
|
@ -96,6 +88,7 @@ THE SOFTWARE.
|
||||||
#include "CCLabelTTF.h"
|
#include "CCLabelTTF.h"
|
||||||
#include "CCLabelBMFont.h"
|
#include "CCLabelBMFont.h"
|
||||||
#include "CCLabel.h"
|
#include "CCLabel.h"
|
||||||
|
#include "CCFontFNT.h"
|
||||||
|
|
||||||
// layers_scenes_transitions_nodes
|
// layers_scenes_transitions_nodes
|
||||||
#include "CCLayer.h"
|
#include "CCLayer.h"
|
||||||
|
@ -230,7 +223,6 @@ THE SOFTWARE.
|
||||||
|
|
||||||
// support
|
// support
|
||||||
#include "ccUTF8.h"
|
#include "ccUTF8.h"
|
||||||
#include "CCNotificationCenter.h"
|
|
||||||
#include "CCProfiling.h"
|
#include "CCProfiling.h"
|
||||||
#include "CCConsole.h"
|
#include "CCConsole.h"
|
||||||
#include "CCUserDefault.h"
|
#include "CCUserDefault.h"
|
||||||
|
@ -277,7 +269,18 @@ THE SOFTWARE.
|
||||||
#include "CCComponentContainer.h"
|
#include "CCComponentContainer.h"
|
||||||
|
|
||||||
// Deprecated include
|
// Deprecated include
|
||||||
#include "CCDeprecated.h"
|
#include "deprecated/CCDictionary.h"
|
||||||
|
#include "deprecated/CCArray.h"
|
||||||
|
#include "deprecated/CCSet.h"
|
||||||
|
#include "deprecated/CCInteger.h"
|
||||||
|
#include "deprecated/CCFloat.h"
|
||||||
|
#include "deprecated/CCDouble.h"
|
||||||
|
#include "deprecated/CCBool.h"
|
||||||
|
#include "deprecated/CCString.h"
|
||||||
|
#include "deprecated/CCNotificationCenter.h"
|
||||||
|
// CCDeprecated.h must be included at the end
|
||||||
|
#include "deprecated/CCDeprecated.h"
|
||||||
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -171,20 +171,22 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
||||||
<ClCompile Include="..\..\external\xxhash\xxhash.c" />
|
<ClCompile Include="..\..\external\xxhash\xxhash.c" />
|
||||||
<ClCompile Include="..\base\atitc.cpp" />
|
<ClCompile Include="..\base\atitc.cpp" />
|
||||||
<ClCompile Include="..\base\CCAffineTransform.cpp" />
|
<ClCompile Include="..\base\CCAffineTransform.cpp" />
|
||||||
<ClCompile Include="..\base\CCArray.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
|
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
|
||||||
<ClCompile Include="..\base\CCConsole.cpp" />
|
<ClCompile Include="..\base\CCConsole.cpp" />
|
||||||
<ClCompile Include="..\base\CCData.cpp" />
|
<ClCompile Include="..\base\CCData.cpp" />
|
||||||
<ClCompile Include="..\base\CCDataVisitor.cpp" />
|
<ClCompile Include="..\base\CCDataVisitor.cpp" />
|
||||||
<ClCompile Include="..\base\CCDictionary.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCGeometry.cpp" />
|
<ClCompile Include="..\base\CCGeometry.cpp" />
|
||||||
<ClCompile Include="..\base\CCNS.cpp" />
|
<ClCompile Include="..\base\CCNS.cpp" />
|
||||||
<ClCompile Include="..\base\CCRef.cpp" />
|
<ClCompile Include="..\base\CCRef.cpp" />
|
||||||
<ClCompile Include="..\base\CCSet.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCString.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCValue.cpp" />
|
<ClCompile Include="..\base\CCValue.cpp" />
|
||||||
<ClCompile Include="..\base\etc1.cpp" />
|
<ClCompile Include="..\base\etc1.cpp" />
|
||||||
<ClCompile Include="..\base\s3tc.cpp" />
|
<ClCompile Include="..\base\s3tc.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCArray.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCDeprecated.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCDictionary.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCSet.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCString.cpp" />
|
||||||
<ClCompile Include="..\math\kazmath\kazmath\aabb.c" />
|
<ClCompile Include="..\math\kazmath\kazmath\aabb.c" />
|
||||||
<ClCompile Include="..\math\kazmath\kazmath\GL\mat4stack.c" />
|
<ClCompile Include="..\math\kazmath\kazmath\GL\mat4stack.c" />
|
||||||
<ClCompile Include="..\math\kazmath\kazmath\GL\matrix.c" />
|
<ClCompile Include="..\math\kazmath\kazmath\GL\matrix.c" />
|
||||||
|
@ -231,7 +233,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
||||||
<ClCompile Include="CCComponent.cpp" />
|
<ClCompile Include="CCComponent.cpp" />
|
||||||
<ClCompile Include="CCComponentContainer.cpp" />
|
<ClCompile Include="CCComponentContainer.cpp" />
|
||||||
<ClCompile Include="CCConfiguration.cpp" />
|
<ClCompile Include="CCConfiguration.cpp" />
|
||||||
<ClCompile Include="CCDeprecated.cpp" />
|
|
||||||
<ClCompile Include="CCDirector.cpp" />
|
<ClCompile Include="CCDirector.cpp" />
|
||||||
<ClCompile Include="CCDrawingPrimitives.cpp" />
|
<ClCompile Include="CCDrawingPrimitives.cpp" />
|
||||||
<ClCompile Include="CCDrawNode.cpp" />
|
<ClCompile Include="CCDrawNode.cpp" />
|
||||||
|
@ -271,7 +272,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
||||||
<ClCompile Include="CCMenuItem.cpp" />
|
<ClCompile Include="CCMenuItem.cpp" />
|
||||||
<ClCompile Include="CCMotionStreak.cpp" />
|
<ClCompile Include="CCMotionStreak.cpp" />
|
||||||
<ClCompile Include="CCNode.cpp" />
|
<ClCompile Include="CCNode.cpp" />
|
||||||
<ClCompile Include="CCNotificationCenter.cpp" />
|
|
||||||
<ClCompile Include="CCParallaxNode.cpp" />
|
<ClCompile Include="CCParallaxNode.cpp" />
|
||||||
<ClCompile Include="CCParticleBatchNode.cpp" />
|
<ClCompile Include="CCParticleBatchNode.cpp" />
|
||||||
<ClCompile Include="CCParticleExamples.cpp" />
|
<ClCompile Include="CCParticleExamples.cpp" />
|
||||||
|
@ -341,28 +341,30 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
||||||
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
|
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
|
||||||
<ClInclude Include="..\base\atitc.h" />
|
<ClInclude Include="..\base\atitc.h" />
|
||||||
<ClInclude Include="..\base\CCAffineTransform.h" />
|
<ClInclude Include="..\base\CCAffineTransform.h" />
|
||||||
<ClInclude Include="..\base\CCArray.h" />
|
|
||||||
<ClInclude Include="..\base\CCAutoreleasePool.h" />
|
<ClInclude Include="..\base\CCAutoreleasePool.h" />
|
||||||
<ClInclude Include="..\base\CCBool.h" />
|
|
||||||
<ClInclude Include="..\base\CCConsole.h" />
|
<ClInclude Include="..\base\CCConsole.h" />
|
||||||
<ClInclude Include="..\base\CCData.h" />
|
<ClInclude Include="..\base\CCData.h" />
|
||||||
<ClInclude Include="..\base\CCDataVisitor.h" />
|
<ClInclude Include="..\base\CCDataVisitor.h" />
|
||||||
<ClInclude Include="..\base\CCDictionary.h" />
|
|
||||||
<ClInclude Include="..\base\CCDouble.h" />
|
|
||||||
<ClInclude Include="..\base\CCFloat.h" />
|
|
||||||
<ClInclude Include="..\base\CCGeometry.h" />
|
<ClInclude Include="..\base\CCGeometry.h" />
|
||||||
<ClInclude Include="..\base\CCInteger.h" />
|
|
||||||
<ClInclude Include="..\base\CCMap.h" />
|
<ClInclude Include="..\base\CCMap.h" />
|
||||||
<ClInclude Include="..\base\CCNS.h" />
|
<ClInclude Include="..\base\CCNS.h" />
|
||||||
<ClInclude Include="..\base\CCRef.h" />
|
<ClInclude Include="..\base\CCRef.h" />
|
||||||
<ClInclude Include="..\base\CCPlatformConfig.h" />
|
<ClInclude Include="..\base\CCPlatformConfig.h" />
|
||||||
<ClInclude Include="..\base\CCPlatformMacros.h" />
|
<ClInclude Include="..\base\CCPlatformMacros.h" />
|
||||||
<ClInclude Include="..\base\CCSet.h" />
|
|
||||||
<ClInclude Include="..\base\CCString.h" />
|
|
||||||
<ClInclude Include="..\base\CCValue.h" />
|
<ClInclude Include="..\base\CCValue.h" />
|
||||||
<ClInclude Include="..\base\CCVector.h" />
|
<ClInclude Include="..\base\CCVector.h" />
|
||||||
<ClInclude Include="..\base\etc1.h" />
|
<ClInclude Include="..\base\etc1.h" />
|
||||||
<ClInclude Include="..\base\s3tc.h" />
|
<ClInclude Include="..\base\s3tc.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCArray.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCBool.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCDeprecated.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCDictionary.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCDouble.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCFloat.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCInteger.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCNotificationCenter.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCSet.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCString.h" />
|
||||||
<ClInclude Include="..\math\kazmath\kazmath\aabb.h" />
|
<ClInclude Include="..\math\kazmath\kazmath\aabb.h" />
|
||||||
<ClInclude Include="..\math\kazmath\kazmath\GL\mat4stack.h" />
|
<ClInclude Include="..\math\kazmath\kazmath\GL\mat4stack.h" />
|
||||||
<ClInclude Include="..\math\kazmath\kazmath\GL\matrix.h" />
|
<ClInclude Include="..\math\kazmath\kazmath\GL\matrix.h" />
|
||||||
|
@ -455,7 +457,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
||||||
<ClInclude Include="CCMenuItem.h" />
|
<ClInclude Include="CCMenuItem.h" />
|
||||||
<ClInclude Include="CCMotionStreak.h" />
|
<ClInclude Include="CCMotionStreak.h" />
|
||||||
<ClInclude Include="CCNode.h" />
|
<ClInclude Include="CCNode.h" />
|
||||||
<ClInclude Include="CCNotificationCenter.h" />
|
|
||||||
<ClInclude Include="CCParallaxNode.h" />
|
<ClInclude Include="CCParallaxNode.h" />
|
||||||
<ClInclude Include="CCParticleBatchNode.h" />
|
<ClInclude Include="CCParticleBatchNode.h" />
|
||||||
<ClInclude Include="CCParticleExamples.h" />
|
<ClInclude Include="CCParticleExamples.h" />
|
||||||
|
|
|
@ -106,6 +106,9 @@
|
||||||
<Filter Include="xxhash">
|
<Filter Include="xxhash">
|
||||||
<UniqueIdentifier>{b4e2b1e5-2d79-44a3-af45-728d47b7bdb2}</UniqueIdentifier>
|
<UniqueIdentifier>{b4e2b1e5-2d79-44a3-af45-728d47b7bdb2}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="deprecated">
|
||||||
|
<UniqueIdentifier>{0b1152b1-c732-4560-8629-87843b0fbd7c}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
|
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
|
||||||
|
@ -394,7 +397,6 @@
|
||||||
<Filter>tilemap_parallax_nodes</Filter>
|
<Filter>tilemap_parallax_nodes</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="CCConfiguration.cpp" />
|
<ClCompile Include="CCConfiguration.cpp" />
|
||||||
<ClCompile Include="CCDeprecated.cpp" />
|
|
||||||
<ClCompile Include="CCDirector.cpp" />
|
<ClCompile Include="CCDirector.cpp" />
|
||||||
<ClCompile Include="ccFPSImages.c" />
|
<ClCompile Include="ccFPSImages.c" />
|
||||||
<ClCompile Include="CCScheduler.cpp" />
|
<ClCompile Include="CCScheduler.cpp" />
|
||||||
|
@ -403,9 +405,6 @@
|
||||||
<ClCompile Include="base64.cpp">
|
<ClCompile Include="base64.cpp">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="CCNotificationCenter.cpp">
|
|
||||||
<Filter>support</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="CCProfiling.cpp">
|
<ClCompile Include="CCProfiling.cpp">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -448,9 +447,6 @@
|
||||||
<ClCompile Include="..\base\CCAffineTransform.cpp">
|
<ClCompile Include="..\base\CCAffineTransform.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\CCArray.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base\CCAutoreleasePool.cpp">
|
<ClCompile Include="..\base\CCAutoreleasePool.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -460,9 +456,6 @@
|
||||||
<ClCompile Include="..\base\CCDataVisitor.cpp">
|
<ClCompile Include="..\base\CCDataVisitor.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\CCDictionary.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base\CCGeometry.cpp">
|
<ClCompile Include="..\base\CCGeometry.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -472,12 +465,6 @@
|
||||||
<ClCompile Include="..\base\CCRef.cpp">
|
<ClCompile Include="..\base\CCRef.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\CCSet.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base\CCString.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="ccUtils.cpp">
|
<ClCompile Include="ccUtils.cpp">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -596,6 +583,24 @@
|
||||||
<ClCompile Include="..\..\external\xxhash\xxhash.c">
|
<ClCompile Include="..\..\external\xxhash\xxhash.c">
|
||||||
<Filter>xxhash</Filter>
|
<Filter>xxhash</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCArray.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCDeprecated.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCDictionary.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCSet.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCString.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
||||||
|
@ -980,9 +985,6 @@
|
||||||
<ClInclude Include="base64.h">
|
<ClInclude Include="base64.h">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="CCNotificationCenter.h">
|
|
||||||
<Filter>support</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="CCProfiling.h">
|
<ClInclude Include="CCProfiling.h">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -1034,48 +1036,24 @@
|
||||||
<ClInclude Include="..\base\CCAffineTransform.h">
|
<ClInclude Include="..\base\CCAffineTransform.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCArray.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCAutoreleasePool.h">
|
<ClInclude Include="..\base\CCAutoreleasePool.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCBool.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCData.h">
|
<ClInclude Include="..\base\CCData.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCDataVisitor.h">
|
<ClInclude Include="..\base\CCDataVisitor.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCDictionary.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCDouble.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCFloat.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCGeometry.h">
|
<ClInclude Include="..\base\CCGeometry.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCInteger.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCNS.h">
|
<ClInclude Include="..\base\CCNS.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCRef.h">
|
<ClInclude Include="..\base\CCRef.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCSet.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCString.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="CCEventListenerMouse.h">
|
<ClInclude Include="CCEventListenerMouse.h">
|
||||||
<Filter>event_dispatcher</Filter>
|
<Filter>event_dispatcher</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -1203,6 +1181,36 @@
|
||||||
<ClInclude Include="..\..\external\xxhash\xxhash.h">
|
<ClInclude Include="..\..\external\xxhash\xxhash.h">
|
||||||
<Filter>xxhash</Filter>
|
<Filter>xxhash</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCArray.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCBool.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCDeprecated.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCDictionary.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCDouble.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCFloat.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCInteger.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCNotificationCenter.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCSet.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCString.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="..\math\kazmath\kazmath\CMakeLists.txt">
|
<Text Include="..\math\kazmath\kazmath\CMakeLists.txt">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\gui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\2d\platform\win32;$(EngineRoot)cocos\2d\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\2d\platform\win32;$(EngineRoot)cocos\2d\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\gui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath\include;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath\include;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -210,20 +210,22 @@
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\atitc.cpp" />
|
<ClCompile Include="..\base\atitc.cpp" />
|
||||||
<ClCompile Include="..\base\CCAffineTransform.cpp" />
|
<ClCompile Include="..\base\CCAffineTransform.cpp" />
|
||||||
<ClCompile Include="..\base\CCArray.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
|
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
|
||||||
<ClCompile Include="..\base\CCConsole.cpp" />
|
<ClCompile Include="..\base\CCConsole.cpp" />
|
||||||
<ClCompile Include="..\base\CCData.cpp" />
|
<ClCompile Include="..\base\CCData.cpp" />
|
||||||
<ClCompile Include="..\base\CCDataVisitor.cpp" />
|
<ClCompile Include="..\base\CCDataVisitor.cpp" />
|
||||||
<ClCompile Include="..\base\CCDictionary.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCGeometry.cpp" />
|
<ClCompile Include="..\base\CCGeometry.cpp" />
|
||||||
<ClCompile Include="..\base\CCNS.cpp" />
|
<ClCompile Include="..\base\CCNS.cpp" />
|
||||||
<ClCompile Include="..\base\CCRef.cpp" />
|
<ClCompile Include="..\base\CCRef.cpp" />
|
||||||
<ClCompile Include="..\base\CCSet.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCString.cpp" />
|
|
||||||
<ClCompile Include="..\base\CCValue.cpp" />
|
<ClCompile Include="..\base\CCValue.cpp" />
|
||||||
<ClCompile Include="..\base\etc1.cpp" />
|
<ClCompile Include="..\base\etc1.cpp" />
|
||||||
<ClCompile Include="..\base\s3tc.cpp" />
|
<ClCompile Include="..\base\s3tc.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCArray.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCDeprecated.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCDictionary.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCSet.cpp" />
|
||||||
|
<ClCompile Include="..\deprecated\CCString.cpp" />
|
||||||
<ClCompile Include="..\math\kazmath\kazmath\aabb.c">
|
<ClCompile Include="..\math\kazmath\kazmath\aabb.c">
|
||||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
|
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
|
||||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
|
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
|
||||||
|
@ -560,7 +562,6 @@
|
||||||
<ClCompile Include="CCComponent.cpp" />
|
<ClCompile Include="CCComponent.cpp" />
|
||||||
<ClCompile Include="CCComponentContainer.cpp" />
|
<ClCompile Include="CCComponentContainer.cpp" />
|
||||||
<ClCompile Include="CCConfiguration.cpp" />
|
<ClCompile Include="CCConfiguration.cpp" />
|
||||||
<ClCompile Include="CCDeprecated.cpp" />
|
|
||||||
<ClCompile Include="CCDirector.cpp" />
|
<ClCompile Include="CCDirector.cpp" />
|
||||||
<ClCompile Include="CCDrawingPrimitives.cpp" />
|
<ClCompile Include="CCDrawingPrimitives.cpp" />
|
||||||
<ClCompile Include="CCDrawNode.cpp" />
|
<ClCompile Include="CCDrawNode.cpp" />
|
||||||
|
@ -617,7 +618,6 @@
|
||||||
<ClCompile Include="CCMenuItem.cpp" />
|
<ClCompile Include="CCMenuItem.cpp" />
|
||||||
<ClCompile Include="CCMotionStreak.cpp" />
|
<ClCompile Include="CCMotionStreak.cpp" />
|
||||||
<ClCompile Include="CCNode.cpp" />
|
<ClCompile Include="CCNode.cpp" />
|
||||||
<ClCompile Include="CCNotificationCenter.cpp" />
|
|
||||||
<ClCompile Include="CCParallaxNode.cpp" />
|
<ClCompile Include="CCParallaxNode.cpp" />
|
||||||
<ClCompile Include="CCParticleBatchNode.cpp" />
|
<ClCompile Include="CCParticleBatchNode.cpp" />
|
||||||
<ClCompile Include="CCParticleExamples.cpp" />
|
<ClCompile Include="CCParticleExamples.cpp" />
|
||||||
|
@ -698,28 +698,30 @@
|
||||||
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
|
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
|
||||||
<ClInclude Include="..\base\atitc.h" />
|
<ClInclude Include="..\base\atitc.h" />
|
||||||
<ClInclude Include="..\base\CCAffineTransform.h" />
|
<ClInclude Include="..\base\CCAffineTransform.h" />
|
||||||
<ClInclude Include="..\base\CCArray.h" />
|
|
||||||
<ClInclude Include="..\base\CCAutoreleasePool.h" />
|
<ClInclude Include="..\base\CCAutoreleasePool.h" />
|
||||||
<ClInclude Include="..\base\CCBool.h" />
|
|
||||||
<ClInclude Include="..\base\CCConsole.h" />
|
<ClInclude Include="..\base\CCConsole.h" />
|
||||||
<ClInclude Include="..\base\CCData.h" />
|
<ClInclude Include="..\base\CCData.h" />
|
||||||
<ClInclude Include="..\base\CCDataVisitor.h" />
|
<ClInclude Include="..\base\CCDataVisitor.h" />
|
||||||
<ClInclude Include="..\base\CCDictionary.h" />
|
|
||||||
<ClInclude Include="..\base\CCDouble.h" />
|
|
||||||
<ClInclude Include="..\base\CCFloat.h" />
|
|
||||||
<ClInclude Include="..\base\CCGeometry.h" />
|
<ClInclude Include="..\base\CCGeometry.h" />
|
||||||
<ClInclude Include="..\base\CCInteger.h" />
|
|
||||||
<ClInclude Include="..\base\CCMap.h" />
|
<ClInclude Include="..\base\CCMap.h" />
|
||||||
<ClInclude Include="..\base\CCNS.h" />
|
<ClInclude Include="..\base\CCNS.h" />
|
||||||
<ClInclude Include="..\base\CCRef.h" />
|
<ClInclude Include="..\base\CCRef.h" />
|
||||||
<ClInclude Include="..\base\CCPlatformConfig.h" />
|
<ClInclude Include="..\base\CCPlatformConfig.h" />
|
||||||
<ClInclude Include="..\base\CCPlatformMacros.h" />
|
<ClInclude Include="..\base\CCPlatformMacros.h" />
|
||||||
<ClInclude Include="..\base\CCSet.h" />
|
|
||||||
<ClInclude Include="..\base\CCString.h" />
|
|
||||||
<ClInclude Include="..\base\CCValue.h" />
|
<ClInclude Include="..\base\CCValue.h" />
|
||||||
<ClInclude Include="..\base\CCVector.h" />
|
<ClInclude Include="..\base\CCVector.h" />
|
||||||
<ClInclude Include="..\base\etc1.h" />
|
<ClInclude Include="..\base\etc1.h" />
|
||||||
<ClInclude Include="..\base\s3tc.h" />
|
<ClInclude Include="..\base\s3tc.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCArray.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCBool.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCDeprecated.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCDictionary.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCDouble.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCFloat.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCInteger.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCNotificationCenter.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCSet.h" />
|
||||||
|
<ClInclude Include="..\deprecated\CCString.h" />
|
||||||
<ClInclude Include="..\math\kazmath\kazmath\aabb.h" />
|
<ClInclude Include="..\math\kazmath\kazmath\aabb.h" />
|
||||||
<ClInclude Include="..\math\kazmath\kazmath\GL\mat4stack.h" />
|
<ClInclude Include="..\math\kazmath\kazmath\GL\mat4stack.h" />
|
||||||
<ClInclude Include="..\math\kazmath\kazmath\GL\matrix.h" />
|
<ClInclude Include="..\math\kazmath\kazmath\GL\matrix.h" />
|
||||||
|
@ -769,7 +771,6 @@
|
||||||
<ClInclude Include="CCComponentContainer.h" />
|
<ClInclude Include="CCComponentContainer.h" />
|
||||||
<ClInclude Include="ccConfig.h" />
|
<ClInclude Include="ccConfig.h" />
|
||||||
<ClInclude Include="CCConfiguration.h" />
|
<ClInclude Include="CCConfiguration.h" />
|
||||||
<ClInclude Include="CCDeprecated.h" />
|
|
||||||
<ClInclude Include="CCDirector.h" />
|
<ClInclude Include="CCDirector.h" />
|
||||||
<ClInclude Include="CCDrawingPrimitives.h" />
|
<ClInclude Include="CCDrawingPrimitives.h" />
|
||||||
<ClInclude Include="CCDrawNode.h" />
|
<ClInclude Include="CCDrawNode.h" />
|
||||||
|
@ -812,7 +813,6 @@
|
||||||
<ClInclude Include="CCMenuItem.h" />
|
<ClInclude Include="CCMenuItem.h" />
|
||||||
<ClInclude Include="CCMotionStreak.h" />
|
<ClInclude Include="CCMotionStreak.h" />
|
||||||
<ClInclude Include="CCNode.h" />
|
<ClInclude Include="CCNode.h" />
|
||||||
<ClInclude Include="CCNotificationCenter.h" />
|
|
||||||
<ClInclude Include="CCParallaxNode.h" />
|
<ClInclude Include="CCParallaxNode.h" />
|
||||||
<ClInclude Include="CCParticleBatchNode.h" />
|
<ClInclude Include="CCParticleBatchNode.h" />
|
||||||
<ClInclude Include="CCParticleExamples.h" />
|
<ClInclude Include="CCParticleExamples.h" />
|
||||||
|
|
|
@ -103,6 +103,9 @@
|
||||||
<Filter Include="xxhash">
|
<Filter Include="xxhash">
|
||||||
<UniqueIdentifier>{a36c6808-a8d6-43f4-bfb0-e08ee2747a21}</UniqueIdentifier>
|
<UniqueIdentifier>{a36c6808-a8d6-43f4-bfb0-e08ee2747a21}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="deprecated">
|
||||||
|
<UniqueIdentifier>{5598fb0c-c012-45b6-8e43-447e7891b61d}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
|
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
|
||||||
|
@ -376,7 +379,6 @@
|
||||||
<Filter>tilemap_parallax_nodes</Filter>
|
<Filter>tilemap_parallax_nodes</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="CCConfiguration.cpp" />
|
<ClCompile Include="CCConfiguration.cpp" />
|
||||||
<ClCompile Include="CCDeprecated.cpp" />
|
|
||||||
<ClCompile Include="CCDirector.cpp" />
|
<ClCompile Include="CCDirector.cpp" />
|
||||||
<ClCompile Include="ccFPSImages.c" />
|
<ClCompile Include="ccFPSImages.c" />
|
||||||
<ClCompile Include="CCScheduler.cpp" />
|
<ClCompile Include="CCScheduler.cpp" />
|
||||||
|
@ -385,9 +387,6 @@
|
||||||
<ClCompile Include="base64.cpp">
|
<ClCompile Include="base64.cpp">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="CCNotificationCenter.cpp">
|
|
||||||
<Filter>support</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="CCProfiling.cpp">
|
<ClCompile Include="CCProfiling.cpp">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -430,9 +429,6 @@
|
||||||
<ClCompile Include="..\base\CCAffineTransform.cpp">
|
<ClCompile Include="..\base\CCAffineTransform.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\CCArray.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base\CCAutoreleasePool.cpp">
|
<ClCompile Include="..\base\CCAutoreleasePool.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -442,9 +438,6 @@
|
||||||
<ClCompile Include="..\base\CCDataVisitor.cpp">
|
<ClCompile Include="..\base\CCDataVisitor.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\CCDictionary.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base\CCGeometry.cpp">
|
<ClCompile Include="..\base\CCGeometry.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -454,12 +447,6 @@
|
||||||
<ClCompile Include="..\base\CCRef.cpp">
|
<ClCompile Include="..\base\CCRef.cpp">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\base\CCSet.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base\CCString.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="ccUtils.cpp">
|
<ClCompile Include="ccUtils.cpp">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -611,6 +598,24 @@
|
||||||
<ClCompile Include="..\..\external\xxhash\xxhash.c">
|
<ClCompile Include="..\..\external\xxhash\xxhash.c">
|
||||||
<Filter>xxhash</Filter>
|
<Filter>xxhash</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCArray.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCDeprecated.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCDictionary.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCSet.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\deprecated\CCString.cpp">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
||||||
|
@ -679,9 +684,6 @@
|
||||||
<ClInclude Include="ccConfig.h">
|
<ClInclude Include="ccConfig.h">
|
||||||
<Filter>include</Filter>
|
<Filter>include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="CCDeprecated.h">
|
|
||||||
<Filter>include</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="CCEventType.h">
|
<ClInclude Include="CCEventType.h">
|
||||||
<Filter>include</Filter>
|
<Filter>include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -980,9 +982,6 @@
|
||||||
<ClInclude Include="base64.h">
|
<ClInclude Include="base64.h">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="CCNotificationCenter.h">
|
|
||||||
<Filter>support</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="CCProfiling.h">
|
<ClInclude Include="CCProfiling.h">
|
||||||
<Filter>support</Filter>
|
<Filter>support</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -1034,48 +1033,24 @@
|
||||||
<ClInclude Include="..\base\CCAffineTransform.h">
|
<ClInclude Include="..\base\CCAffineTransform.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCArray.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCAutoreleasePool.h">
|
<ClInclude Include="..\base\CCAutoreleasePool.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCBool.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCData.h">
|
<ClInclude Include="..\base\CCData.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCDataVisitor.h">
|
<ClInclude Include="..\base\CCDataVisitor.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCDictionary.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCDouble.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCFloat.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCGeometry.h">
|
<ClInclude Include="..\base\CCGeometry.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCInteger.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCNS.h">
|
<ClInclude Include="..\base\CCNS.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCRef.h">
|
<ClInclude Include="..\base\CCRef.h">
|
||||||
<Filter>base</Filter>
|
<Filter>base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\base\CCSet.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\base\CCString.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="CCEventListenerMouse.h">
|
<ClInclude Include="CCEventListenerMouse.h">
|
||||||
<Filter>event_dispatcher</Filter>
|
<Filter>event_dispatcher</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -1239,5 +1214,35 @@
|
||||||
<ClInclude Include="..\..\external\xxhash\xxhash.h">
|
<ClInclude Include="..\..\external\xxhash\xxhash.h">
|
||||||
<Filter>xxhash</Filter>
|
<Filter>xxhash</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCArray.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCBool.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCDeprecated.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCDictionary.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCDouble.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCFloat.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCInteger.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCNotificationCenter.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCSet.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\deprecated\CCString.h">
|
||||||
|
<Filter>deprecated</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -7,7 +7,7 @@
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d\platform\wp8;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\gui;$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)cocos\math\kazmath\include;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d\platform\wp8;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\ui;$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)cocos\math\kazmath\include;$(EngineRoot)cocos\deprecated;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<CompileAsWinRT>true</CompileAsWinRT>
|
<CompileAsWinRT>true</CompileAsWinRT>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
|
|
@ -500,9 +500,10 @@ void FileUtils::purgeCachedEntries()
|
||||||
|
|
||||||
static Data getData(const std::string& filename, bool forString)
|
static Data getData(const std::string& filename, bool forString)
|
||||||
{
|
{
|
||||||
// getData is used indirectly in Image::initWithImageFileThreadSafe(), but CCASSERT is not thread-safe
|
if (filename.empty())
|
||||||
// CCASSERT(!filename.empty(), "Invalid filename!");
|
{
|
||||||
assert(!(filename.empty()));
|
return Data::Null;
|
||||||
|
}
|
||||||
|
|
||||||
Data ret;
|
Data ret;
|
||||||
unsigned char* buffer = nullptr;
|
unsigned char* buffer = nullptr;
|
||||||
|
@ -556,6 +557,7 @@ std::string FileUtils::getStringFromFile(const std::string& filename)
|
||||||
Data data = getData(filename, true);
|
Data data = getData(filename, true);
|
||||||
if (data.isNull())
|
if (data.isNull())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
std::string ret((const char*)data.getBytes());
|
std::string ret((const char*)data.getBytes());
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,8 @@ THE SOFTWARE.
|
||||||
#include "CCGLViewProtocol.h"
|
#include "CCGLViewProtocol.h"
|
||||||
#include "CCTouch.h"
|
#include "CCTouch.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCSet.h"
|
|
||||||
#include "CCEventDispatcher.h"
|
#include "CCEventDispatcher.h"
|
||||||
|
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -369,7 +367,7 @@ void GLViewProtocol::handleTouchesOfEndOrCancel(EventTouch::EventCode eventCode,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CCLOG("Ending touches with id: %ld error", id);
|
CCLOG("Ending touches with id: %ld error", static_cast<long>(id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
|
||||||
$(LOCAL_PATH)/../.. \
|
$(LOCAL_PATH)/../.. \
|
||||||
|
$(LOCAL_PATH)/../../.. \
|
||||||
$(LOCAL_PATH)/../../../base \
|
$(LOCAL_PATH)/../../../base \
|
||||||
$(LOCAL_PATH)/../../../math/kazmath \
|
$(LOCAL_PATH)/../../../math/kazmath \
|
||||||
$(LOCAL_PATH)/../../../physics
|
$(LOCAL_PATH)/../../../physics
|
||||||
|
|
|
@ -70,7 +70,7 @@ class BitmapDC
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BitmapDC()
|
BitmapDC()
|
||||||
: _data(NULL)
|
: _data(nullptr)
|
||||||
, _width(0)
|
, _width(0)
|
||||||
, _height(0)
|
, _height(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,6 +243,9 @@ Data FileUtilsAndroid::getData(const std::string& filename, bool forString)
|
||||||
std::string FileUtilsAndroid::getStringFromFile(const std::string& filename)
|
std::string FileUtilsAndroid::getStringFromFile(const std::string& filename)
|
||||||
{
|
{
|
||||||
Data data = getData(filename, true);
|
Data data = getData(filename, true);
|
||||||
|
if (data.isNull())
|
||||||
|
return "";
|
||||||
|
|
||||||
std::string ret((const char*)data.getBytes());
|
std::string ret((const char*)data.getBytes());
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ THE SOFTWARE.
|
||||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||||
|
|
||||||
#include "CCGLView.h"
|
#include "CCGLView.h"
|
||||||
#include "CCSet.h"
|
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "jni/IMEJni.h"
|
#include "jni/IMEJni.h"
|
||||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||||
#include "JniHelper.h"
|
#include "JniHelper.h"
|
||||||
#include "CCFileUtilsAndroid.h"
|
#include "CCFileUtilsAndroid.h"
|
||||||
#include "android/asset_manager_jni.h"
|
#include "android/asset_manager_jni.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "Java_org_cocos2dx_lib_Cocos2dxHelper.h"
|
#include "Java_org_cocos2dx_lib_Cocos2dxHelper.h"
|
||||||
|
|
||||||
#define LOG_TAG "Java_org_cocos2dx_lib_Cocos2dxHelper.cpp"
|
#define LOG_TAG "Java_org_cocos2dx_lib_Cocos2dxHelper.cpp"
|
||||||
|
|
|
@ -21,7 +21,6 @@ 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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCSet.h"
|
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCEventKeyboard.h"
|
#include "CCEventKeyboard.h"
|
||||||
#include "CCGLView.h"
|
#include "CCGLView.h"
|
||||||
|
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCFileUtils.h"
|
#include "CCFileUtils.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCSAXParser.h"
|
#include "CCSAXParser.h"
|
||||||
|
|
|
@ -24,17 +24,15 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCGLView.h"
|
#include "CCGLView.h"
|
||||||
|
|
||||||
#include <unordered_map>
|
|
||||||
|
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
#include "CCSet.h"
|
|
||||||
#include "CCTouch.h"
|
#include "CCTouch.h"
|
||||||
#include "CCEventDispatcher.h"
|
#include "CCEventDispatcher.h"
|
||||||
#include "CCEventKeyboard.h"
|
#include "CCEventKeyboard.h"
|
||||||
#include "CCEventMouse.h"
|
#include "CCEventMouse.h"
|
||||||
#include "CCIMEDispatcher.h"
|
#include "CCIMEDispatcher.h"
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
// GLFWEventHandler
|
// GLFWEventHandler
|
||||||
|
@ -260,7 +258,7 @@ GLView::GLView()
|
||||||
, _retinaFactor(1)
|
, _retinaFactor(1)
|
||||||
, _frameZoomFactor(1.0f)
|
, _frameZoomFactor(1.0f)
|
||||||
, _mainWindow(nullptr)
|
, _mainWindow(nullptr)
|
||||||
, _primaryMonitor(nullptr)
|
, _monitor(nullptr)
|
||||||
, _mouseX(0.0f)
|
, _mouseX(0.0f)
|
||||||
, _mouseY(0.0f)
|
, _mouseY(0.0f)
|
||||||
{
|
{
|
||||||
|
@ -317,6 +315,18 @@ GLView* GLView::createWithFullScreen(const std::string& viewName)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLView* GLView::createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor)
|
||||||
|
{
|
||||||
|
auto ret = new GLView();
|
||||||
|
if(ret && ret->initWithFullscreen(viewName, videoMode, monitor)) {
|
||||||
|
ret->autorelease();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool GLView::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor)
|
bool GLView::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor)
|
||||||
{
|
{
|
||||||
setViewName(viewName);
|
setViewName(viewName);
|
||||||
|
@ -328,7 +338,7 @@ bool GLView::initWithRect(const std::string& viewName, Rect rect, float frameZoo
|
||||||
_mainWindow = glfwCreateWindow(rect.size.width * _frameZoomFactor,
|
_mainWindow = glfwCreateWindow(rect.size.width * _frameZoomFactor,
|
||||||
rect.size.height * _frameZoomFactor,
|
rect.size.height * _frameZoomFactor,
|
||||||
_viewName.c_str(),
|
_viewName.c_str(),
|
||||||
_primaryMonitor,
|
_monitor,
|
||||||
nullptr);
|
nullptr);
|
||||||
glfwMakeContextCurrent(_mainWindow);
|
glfwMakeContextCurrent(_mainWindow);
|
||||||
|
|
||||||
|
@ -366,14 +376,31 @@ bool GLView::initWithRect(const std::string& viewName, Rect rect, float frameZoo
|
||||||
|
|
||||||
bool GLView::initWithFullScreen(const std::string& viewName)
|
bool GLView::initWithFullScreen(const std::string& viewName)
|
||||||
{
|
{
|
||||||
_primaryMonitor = glfwGetPrimaryMonitor();
|
//Create fullscreen window on primary monitor at its current video mode.
|
||||||
if (nullptr == _primaryMonitor)
|
_monitor = glfwGetPrimaryMonitor();
|
||||||
|
if (nullptr == _monitor)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const GLFWvidmode* videoMode = glfwGetVideoMode(_primaryMonitor);
|
const GLFWvidmode* videoMode = glfwGetVideoMode(_monitor);
|
||||||
return initWithRect(viewName, Rect(0, 0, videoMode->width, videoMode->height), 1.0f);
|
return initWithRect(viewName, Rect(0, 0, videoMode->width, videoMode->height), 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GLView::initWithFullscreen(const std::string &viewname, const GLFWvidmode &videoMode, GLFWmonitor *monitor)
|
||||||
|
{
|
||||||
|
//Create fullscreen on specified monitor at the specified video mode.
|
||||||
|
_monitor = monitor;
|
||||||
|
if (nullptr == _monitor)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
//These are soft contraints. If the video mode is retrieved at runtime, the resulting window and context should match these exactly. If invalid attribs are passed (eg. from an outdated cache), window creation will NOT fail but the actual window/context may differ.
|
||||||
|
glfwWindowHint(GLFW_REFRESH_RATE, videoMode.refreshRate);
|
||||||
|
glfwWindowHint(GLFW_RED_BITS, videoMode.redBits);
|
||||||
|
glfwWindowHint(GLFW_BLUE_BITS, videoMode.blueBits);
|
||||||
|
glfwWindowHint(GLFW_GREEN_BITS, videoMode.greenBits);
|
||||||
|
|
||||||
|
return initWithRect(viewname, Rect(0, 0, videoMode.width, videoMode.height), 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
bool GLView::isOpenGLReady()
|
bool GLView::isOpenGLReady()
|
||||||
{
|
{
|
||||||
return nullptr != _mainWindow;
|
return nullptr != _mainWindow;
|
||||||
|
|
|
@ -39,6 +39,7 @@ public:
|
||||||
static GLView* create(const std::string& viewName);
|
static GLView* create(const std::string& viewName);
|
||||||
static GLView* createWithRect(const std::string& viewName, Rect size, float frameZoomFactor = 1.0f);
|
static GLView* createWithRect(const std::string& viewName, Rect size, float frameZoomFactor = 1.0f);
|
||||||
static GLView* createWithFullScreen(const std::string& viewName);
|
static GLView* createWithFullScreen(const std::string& viewName);
|
||||||
|
static GLView* createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*frameZoomFactor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop.
|
*frameZoomFactor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop.
|
||||||
|
@ -82,6 +83,7 @@ protected:
|
||||||
|
|
||||||
bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor);
|
bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor);
|
||||||
bool initWithFullScreen(const std::string& viewName);
|
bool initWithFullScreen(const std::string& viewName);
|
||||||
|
bool initWithFullscreen(const std::string& viewname, const GLFWvidmode &videoMode, GLFWmonitor *monitor);
|
||||||
|
|
||||||
bool initGlew();
|
bool initGlew();
|
||||||
|
|
||||||
|
@ -107,7 +109,7 @@ protected:
|
||||||
float _frameZoomFactor;
|
float _frameZoomFactor;
|
||||||
|
|
||||||
GLFWwindow* _mainWindow;
|
GLFWwindow* _mainWindow;
|
||||||
GLFWmonitor* _primaryMonitor;
|
GLFWmonitor* _monitor;
|
||||||
|
|
||||||
float _mouseX;
|
float _mouseX;
|
||||||
float _mouseY;
|
float _mouseY;
|
||||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
||||||
#include "platform/CCCommon.h"
|
#include "platform/CCCommon.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
#include "CCApplication.h"
|
#include "CCApplication.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -31,11 +31,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(_USRDLL)
|
#define CC_DLL
|
||||||
#define CC_DLL __attribute__ ((visibility ("default")))
|
|
||||||
#else /* use a DLL library */
|
|
||||||
#define CC_DLL __attribute__ ((visibility ("default")))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#define CC_ASSERT(cond) assert(cond)
|
#define CC_ASSERT(cond) assert(cond)
|
||||||
|
|
|
@ -40,6 +40,7 @@ THE SOFTWARE.
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(x,y) (((x) > (y)) ? (y) : (x))
|
#define MIN(x,y) (((x) > (y)) ? (y) : (x))
|
||||||
|
|
|
@ -43,10 +43,10 @@ NS_CC_BEGIN
|
||||||
Application * Application::sm_pSharedApplication = 0;
|
Application * Application::sm_pSharedApplication = 0;
|
||||||
|
|
||||||
Application::Application()
|
Application::Application()
|
||||||
: _instance(NULL)
|
: _instance(nullptr)
|
||||||
, _accelTable(NULL)
|
, _accelTable(nullptr)
|
||||||
{
|
{
|
||||||
_instance = GetModuleHandle(NULL);
|
_instance = GetModuleHandle(nullptr);
|
||||||
_animationInterval.QuadPart = 0;
|
_animationInterval.QuadPart = 0;
|
||||||
CC_ASSERT(! sm_pSharedApplication);
|
CC_ASSERT(! sm_pSharedApplication);
|
||||||
sm_pSharedApplication = this;
|
sm_pSharedApplication = this;
|
||||||
|
|
|
@ -56,10 +56,10 @@ class BitmapDC
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BitmapDC(HWND hWnd = NULL)
|
BitmapDC(HWND hWnd = NULL)
|
||||||
: _DC(NULL)
|
: _DC(nullptr)
|
||||||
, _bmp(NULL)
|
, _bmp(nullptr)
|
||||||
, _font((HFONT)GetStockObject(DEFAULT_GUI_FONT))
|
, _font((HFONT)GetStockObject(DEFAULT_GUI_FONT))
|
||||||
, _wnd(NULL)
|
, _wnd(nullptr)
|
||||||
{
|
{
|
||||||
_wnd = hWnd;
|
_wnd = hWnd;
|
||||||
HDC hdc = GetDC(hWnd);
|
HDC hdc = GetDC(hWnd);
|
||||||
|
|
|
@ -131,8 +131,13 @@ bool FileUtilsWin32::isAbsolutePath(const std::string& strPath) const
|
||||||
|
|
||||||
static Data getData(const std::string& filename, bool forString)
|
static Data getData(const std::string& filename, bool forString)
|
||||||
{
|
{
|
||||||
|
if (filename.empty())
|
||||||
|
{
|
||||||
|
return Data::Null;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned char *buffer = nullptr;
|
unsigned char *buffer = nullptr;
|
||||||
CCASSERT(!filename.empty(), "Invalid parameters.");
|
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -195,6 +200,7 @@ std::string FileUtilsWin32::getStringFromFile(const std::string& filename)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ret((const char*)data.getBytes());
|
std::string ret((const char*)data.getBytes());
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ protected:
|
||||||
* @return Upon success, a pointer to the data is returned, otherwise NULL.
|
* @return Upon success, a pointer to the data is returned, otherwise NULL.
|
||||||
* @warning Recall: you are responsible for calling delete[] on any Non-NULL pointer returned.
|
* @warning Recall: you are responsible for calling delete[] on any Non-NULL pointer returned.
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual unsigned char* getFileData(const std::string& filename, const char* mode, ssize_t * size) override;
|
virtual unsigned char* getFileData(const std::string& filename, const char* mode, ssize_t * size) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets string from a file.
|
* Gets string from a file.
|
||||||
|
|
|
@ -29,10 +29,11 @@ THE SOFTWARE.
|
||||||
#include "CCPlatformConfig.h"
|
#include "CCPlatformConfig.h"
|
||||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||||
|
|
||||||
//typedef SSIZE_T ssize_t;
|
#include <BaseTsd.h>
|
||||||
// ssize_t was redefined as int in libwebsockets.h.
|
#ifndef __SSIZE_T
|
||||||
// Therefore, to avoid conflict, we needs the same definition.
|
#define __SSIZE_T
|
||||||
typedef int ssize_t;
|
typedef SSIZE_T ssize_t;
|
||||||
|
#endif // __SSIZE_T
|
||||||
|
|
||||||
#include "CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
|
@ -32,11 +32,12 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include "CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
#include <BaseTsd.h>
|
||||||
|
|
||||||
//typedef SSIZE_T ssize_t;
|
#ifndef __SSIZE_T
|
||||||
// ssize_t was redefined as int in libwebsockets.h.
|
#define __SSIZE_T
|
||||||
// Therefore, to avoid conflict, we needs the same definition.
|
typedef SSIZE_T ssize_t;
|
||||||
typedef int ssize_t;
|
#endif // __SSIZE_T
|
||||||
|
|
||||||
// for math.h on win32 platform
|
// for math.h on win32 platform
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,12 @@ static void convertIntToByteArray(int value, int* output)
|
||||||
}
|
}
|
||||||
|
|
||||||
QuadCommand::QuadCommand()
|
QuadCommand::QuadCommand()
|
||||||
:_textureID(0)
|
:_materialID(0)
|
||||||
,_blendType(BlendFunc::DISABLE)
|
,_textureID(0)
|
||||||
,_quadsCount(0)
|
|
||||||
,_shader(nullptr)
|
,_shader(nullptr)
|
||||||
|
,_blendType(BlendFunc::DISABLE)
|
||||||
,_quads(nullptr)
|
,_quads(nullptr)
|
||||||
|
,_quadsCount(0)
|
||||||
{
|
{
|
||||||
_type = RenderCommand::Type::QUAD_COMMAND;
|
_type = RenderCommand::Type::QUAD_COMMAND;
|
||||||
}
|
}
|
||||||
|
@ -49,21 +50,18 @@ void QuadCommand::init(float globalOrder, GLuint textureID, GLProgram* shader, B
|
||||||
{
|
{
|
||||||
_globalOrder = globalOrder;
|
_globalOrder = globalOrder;
|
||||||
|
|
||||||
_textureID = textureID;
|
|
||||||
_blendType = blendType;
|
|
||||||
_shader = shader;
|
|
||||||
|
|
||||||
_quadsCount = quadCount;
|
_quadsCount = quadCount;
|
||||||
_quads = quad;
|
_quads = quad;
|
||||||
|
|
||||||
_mv = mv;
|
_mv = mv;
|
||||||
|
|
||||||
if( _textureID != _lastTextureID || _blendType.src != _lastBlendType.src || _blendType.dst != _lastBlendType.dst || _shader != _lastShader) {
|
if( _textureID != textureID || _blendType.src != blendType.src || _blendType.dst != blendType.dst || _shader != shader) {
|
||||||
|
|
||||||
|
_textureID = textureID;
|
||||||
|
_blendType = blendType;
|
||||||
|
_shader = shader;
|
||||||
|
|
||||||
generateMaterialID();
|
generateMaterialID();
|
||||||
|
|
||||||
_lastShader = _shader;
|
|
||||||
_lastBlendType = _blendType;
|
|
||||||
_lastTextureID = _textureID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,13 +73,10 @@ protected:
|
||||||
uint32_t _materialID;
|
uint32_t _materialID;
|
||||||
|
|
||||||
GLuint _textureID;
|
GLuint _textureID;
|
||||||
GLuint _lastTextureID;
|
|
||||||
|
|
||||||
GLProgram* _shader;
|
GLProgram* _shader;
|
||||||
GLProgram* _lastShader;
|
|
||||||
|
|
||||||
BlendFunc _blendType;
|
BlendFunc _blendType;
|
||||||
BlendFunc _lastBlendType;
|
|
||||||
|
|
||||||
V3F_C4B_T2F_Quad* _quads;
|
V3F_C4B_T2F_Quad* _quads;
|
||||||
ssize_t _quadsCount;
|
ssize_t _quadsCount;
|
||||||
|
|
|
@ -68,17 +68,17 @@ void RenderQueue::sort()
|
||||||
|
|
||||||
RenderCommand* RenderQueue::operator[](ssize_t index) const
|
RenderCommand* RenderQueue::operator[](ssize_t index) const
|
||||||
{
|
{
|
||||||
if(index < _queueNegZ.size())
|
if(index < static_cast<ssize_t>(_queueNegZ.size()))
|
||||||
return _queueNegZ[index];
|
return _queueNegZ[index];
|
||||||
|
|
||||||
index -= _queueNegZ.size();
|
index -= _queueNegZ.size();
|
||||||
|
|
||||||
if(index < _queue0.size())
|
if(index < static_cast<ssize_t>(_queue0.size()))
|
||||||
return _queue0[index];
|
return _queue0[index];
|
||||||
|
|
||||||
index -= _queue0.size();
|
index -= _queue0.size();
|
||||||
|
|
||||||
if(index < _queuePosZ.size())
|
if(index < static_cast<ssize_t>(_queuePosZ.size()))
|
||||||
return _queuePosZ[index];
|
return _queuePosZ[index];
|
||||||
|
|
||||||
CCASSERT(false, "invalid index");
|
CCASSERT(false, "invalid index");
|
||||||
|
|
|
@ -12,6 +12,7 @@ LOCAL_SRC_FILES := cddSimpleAudioEngine.cpp \
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \
|
||||||
|
$(LOCAL_PATH)/../.. \
|
||||||
$(LOCAL_PATH)/../../math/kazmath \
|
$(LOCAL_PATH)/../../math/kazmath \
|
||||||
$(LOCAL_PATH)/../../2d \
|
$(LOCAL_PATH)/../../2d \
|
||||||
$(LOCAL_PATH)/../../2d/platform/android \
|
$(LOCAL_PATH)/../../2d/platform/android \
|
||||||
|
|
|
@ -39,9 +39,9 @@ namespace CocosDenshion {
|
||||||
// Removing `assets` since it isn't needed for the API of playing sound.
|
// Removing `assets` since it isn't needed for the API of playing sound.
|
||||||
size_t pos = fullPath.find("assets/");
|
size_t pos = fullPath.find("assets/");
|
||||||
if (pos == 0)
|
if (pos == 0)
|
||||||
{
|
{
|
||||||
fullPath = fullPath.substr(strlen("assets/"));
|
fullPath = fullPath.substr(strlen("assets/"));
|
||||||
}
|
}
|
||||||
return fullPath;
|
return fullPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
|
@ -650,7 +651,7 @@ void Console::commandTouch(int fd, const std::string& args)
|
||||||
float x = std::atof(argv[1].c_str());
|
float x = std::atof(argv[1].c_str());
|
||||||
float y = std::atof(argv[2].c_str());
|
float y = std::atof(argv[2].c_str());
|
||||||
|
|
||||||
srand ((unsigned)time(NULL));
|
srand ((unsigned)time(nullptr));
|
||||||
_touchId = rand();
|
_touchId = rand();
|
||||||
Scheduler *sched = Director::getInstance()->getScheduler();
|
Scheduler *sched = Director::getInstance()->getScheduler();
|
||||||
sched->performFunctionInCocosThread( [&](){
|
sched->performFunctionInCocosThread( [&](){
|
||||||
|
@ -678,7 +679,7 @@ void Console::commandTouch(int fd, const std::string& args)
|
||||||
float x2 = std::atof(argv[3].c_str());
|
float x2 = std::atof(argv[3].c_str());
|
||||||
float y2 = std::atof(argv[4].c_str());
|
float y2 = std::atof(argv[4].c_str());
|
||||||
|
|
||||||
srand ((unsigned)time(NULL));
|
srand ((unsigned)time(nullptr));
|
||||||
_touchId = rand();
|
_touchId = rand();
|
||||||
|
|
||||||
Scheduler *sched = Director::getInstance()->getScheduler();
|
Scheduler *sched = Director::getInstance()->getScheduler();
|
||||||
|
@ -844,7 +845,8 @@ void Console::commandUpload(int fd)
|
||||||
|
|
||||||
ssize_t Console::readBytes(int fd, char* buffer, size_t maxlen, bool* more)
|
ssize_t Console::readBytes(int fd, char* buffer, size_t maxlen, bool* more)
|
||||||
{
|
{
|
||||||
ssize_t n, rc;
|
size_t n;
|
||||||
|
int rc;
|
||||||
char c, *ptr = buffer;
|
char c, *ptr = buffer;
|
||||||
*more = false;
|
*more = false;
|
||||||
for( n = 0; n < maxlen; n++ ) {
|
for( n = 0; n < maxlen; n++ ) {
|
||||||
|
@ -927,7 +929,7 @@ bool Console::parseCommand(int fd)
|
||||||
if(it != _commands.end())
|
if(it != _commands.end())
|
||||||
{
|
{
|
||||||
std::string args2;
|
std::string args2;
|
||||||
for(int i = 1; i < args.size(); ++i)
|
for(size_t i = 1; i < args.size(); ++i)
|
||||||
{
|
{
|
||||||
if(i > 1)
|
if(i > 1)
|
||||||
{
|
{
|
||||||
|
@ -954,7 +956,8 @@ bool Console::parseCommand(int fd)
|
||||||
|
|
||||||
ssize_t Console::readline(int fd, char* ptr, size_t maxlen)
|
ssize_t Console::readline(int fd, char* ptr, size_t maxlen)
|
||||||
{
|
{
|
||||||
ssize_t n, rc;
|
size_t n;
|
||||||
|
int rc;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
for( n = 0; n < maxlen - 1; n++ ) {
|
for( n = 0; n < maxlen - 1; n++ ) {
|
||||||
|
@ -1056,6 +1059,19 @@ void Console::loop()
|
||||||
for(const auto &fd: _fds) {
|
for(const auto &fd: _fds) {
|
||||||
if(FD_ISSET(fd,©_set))
|
if(FD_ISSET(fd,©_set))
|
||||||
{
|
{
|
||||||
|
//fix Bug #4302 Test case ConsoleTest--ConsoleUploadFile crashed on Linux
|
||||||
|
//On linux, if you send data to a closed socket, the sending process will
|
||||||
|
//receive a SIGPIPE, which will cause linux system shutdown the sending process.
|
||||||
|
//Add this ioctl code to check if the socket has been closed by peer.
|
||||||
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||||
|
int n = 0;
|
||||||
|
ioctl(fd, FIONREAD, &n);
|
||||||
|
if(n == 0)
|
||||||
|
{
|
||||||
|
//no data received, or fd is closed
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if( ! parseCommand(fd) )
|
if( ! parseCommand(fd) )
|
||||||
{
|
{
|
||||||
to_remove.push_back(fd);
|
to_remove.push_back(fd);
|
||||||
|
|
|
@ -29,10 +29,12 @@
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#include <BaseTsd.h>
|
#include <BaseTsd.h>
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
//typedef SSIZE_T ssize_t;
|
|
||||||
// ssize_t was redefined as int in libwebsockets.h.
|
#ifndef __SSIZE_T
|
||||||
// Therefore, to avoid conflict, we needs the same definition.
|
#define __SSIZE_T
|
||||||
typedef int ssize_t;
|
typedef SSIZE_T ssize_t;
|
||||||
|
#endif // __SSIZE_T
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCRef.h"
|
#include "CCRef.h"
|
||||||
#include "CCBool.h"
|
#include "deprecated/CCBool.h"
|
||||||
#include "CCInteger.h"
|
#include "deprecated/CCInteger.h"
|
||||||
#include "CCFloat.h"
|
#include "deprecated/CCFloat.h"
|
||||||
#include "CCDouble.h"
|
#include "deprecated/CCDouble.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCArray.h"
|
#include "deprecated/CCArray.h"
|
||||||
#include "CCDictionary.h"
|
#include "deprecated/CCDictionary.h"
|
||||||
#include "CCSet.h"
|
#include "deprecated/CCSet.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
set(COCOS_BASE_SRC
|
set(COCOS_BASE_SRC
|
||||||
|
../deprecated/CCSet.cpp
|
||||||
|
../deprecated/CCArray.cpp
|
||||||
|
../deprecated/CCDictionary.cpp
|
||||||
|
../deprecated/CCString.cpp
|
||||||
CCAffineTransform.cpp
|
CCAffineTransform.cpp
|
||||||
CCAutoreleasePool.cpp
|
CCAutoreleasePool.cpp
|
||||||
CCGeometry.cpp
|
CCGeometry.cpp
|
||||||
CCNS.cpp
|
CCNS.cpp
|
||||||
CCRef.cpp
|
CCRef.cpp
|
||||||
CCSet.cpp
|
|
||||||
CCArray.cpp
|
|
||||||
CCDictionary.cpp
|
|
||||||
CCString.cpp
|
|
||||||
CCDataVisitor.cpp
|
CCDataVisitor.cpp
|
||||||
CCData.cpp
|
CCData.cpp
|
||||||
CCValue.cpp
|
CCValue.cpp
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCArray.h"
|
#include "CCArray.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
@ -37,7 +37,7 @@ NS_CC_BEGIN
|
||||||
// ----------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
__Array::__Array()
|
__Array::__Array()
|
||||||
: data(NULL)
|
: data(nullptr)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
|
@ -24,10 +24,10 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCDictionary.h"
|
#include "CCDictionary.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCInteger.h"
|
#include "CCInteger.h"
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
#include "CCBool.h"
|
#include "CCBool.h"
|
||||||
#include "CCInteger.h"
|
#include "CCInteger.h"
|
||||||
#include "CCFloat.h"
|
#include "CCFloat.h"
|
||||||
|
@ -77,7 +77,7 @@ DictElement::~DictElement()
|
||||||
// __Dictionary
|
// __Dictionary
|
||||||
|
|
||||||
__Dictionary::__Dictionary()
|
__Dictionary::__Dictionary()
|
||||||
: _elements(NULL)
|
: _elements(nullptr)
|
||||||
, _dictType(kDictUnknown)
|
, _dictType(kDictUnknown)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||||
#include "uthash.h"
|
#include "uthash.h"
|
||||||
#include "CCRef.h"
|
#include "CCRef.h"
|
||||||
#include "CCArray.h"
|
#include "CCArray.h"
|
||||||
#include "CCString.h"
|
#include "deprecated/CCString.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "CCNotificationCenter.h"
|
#include "CCNotificationCenter.h"
|
||||||
#include "CCArray.h"
|
#include "deprecated/CCArray.h"
|
||||||
#include "CCScriptSupport.h"
|
#include "CCScriptSupport.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue