1. merge scenereader Armature merge to cocos2dx 3.0.

This commit is contained in:
zhangcheng 2013-09-09 19:51:26 +08:00
parent c5b113c35e
commit 1115d0d3f9
85 changed files with 2329 additions and 1259 deletions

View File

@ -8,32 +8,7 @@ LOCAL_MODULE_FILENAME := libextension
LOCAL_SRC_FILES := \
CCDeprecated-ext.cpp \
AssetsManager/AssetsManager.cpp \
CCArmature/CCArmature.cpp \
CCArmature/CCBone.cpp \
CCArmature/animation/CCArmatureAnimation.cpp \
CCArmature/animation/CCProcessBase.cpp \
CCArmature/animation/CCTween.cpp \
CCArmature/datas/CCDatas.cpp \
CCArmature/display/CCBatchNode.cpp \
CCArmature/display/CCDecorativeDisplay.cpp \
CCArmature/display/CCDisplayFactory.cpp \
CCArmature/display/CCDisplayManager.cpp \
CCArmature/display/CCShaderNode.cpp \
CCArmature/display/CCSkin.cpp \
CCArmature/external_tool/CCTexture2DMutable.cpp \
CCArmature/external_tool/GLES-Render.cpp \
CCArmature/external_tool/Json/CSContentJsonDictionary.cpp \
CCArmature/external_tool/Json/lib_json/json_reader.cpp \
CCArmature/external_tool/Json/lib_json/json_value.cpp \
CCArmature/external_tool/Json/lib_json/json_writer.cpp \
CCArmature/physics/CCColliderDetector.cpp \
CCArmature/physics/CCPhysicsWorld.cpp \
CCArmature/utils/CCArmatureDataManager.cpp \
CCArmature/utils/CCDataReaderHelper.cpp \
CCArmature/utils/CCSpriteFrameCacheHelper.cpp \
CCArmature/utils/CCTransformHelp.cpp \
CCArmature/utils/CCTweenFunction.cpp \
CCArmature/utils/CCUtilMath.cpp \
CCBReader/CCBAnimationManager.cpp \
CCBReader/CCBFileLoader.cpp \
CCBReader/CCBKeyframe.cpp \
@ -56,11 +31,7 @@ CCBReader/CCNodeLoaderLibrary.cpp \
CCBReader/CCParticleSystemQuadLoader.cpp \
CCBReader/CCScale9SpriteLoader.cpp \
CCBReader/CCScrollViewLoader.cpp \
CCBReader/CCSpriteLoader.cpp \
Components/CCComAttribute.cpp \
Components/CCComAudio.cpp \
Components/CCComController.cpp \
Components/CCInputDelegate.cpp \
CCBReader/CCSpriteLoader.cpp
GUI/CCControlExtension/CCControl.cpp \
GUI/CCControlExtension/CCControlButton.cpp \
GUI/CCControlExtension/CCControlColourPicker.cpp \
@ -89,6 +60,38 @@ network/SocketIO.cpp \
network/WebSocket.cpp \
physics_nodes/CCPhysicsDebugNode.cpp \
physics_nodes/CCPhysicsSprite.cpp \
CocoStudio/Armature/CCArmature.cpp \
CocoStudio/Armature/CCBone.cpp \
CocoStudio/Armature/animation/CCArmatureAnimation.cpp \
CocoStudio/Armature/animation/CCProcessBase.cpp \
CocoStudio/Armature/animation/CCTween.cpp \
CocoStudio/Armature/datas/CCDatas.cpp \
CocoStudio/Armature/display/CCBatchNode.cpp \
CocoStudio/Armature/display/CCDecorativeDisplay.cpp \
CocoStudio/Armature/display/CCDisplayFactory.cpp \
CocoStudio/Armature/display/CCDisplayManager.cpp \
CocoStudio/Armature/display/CCSkin.cpp \
CocoStudio/Armature/external_tool/CCTexture2DMutable.cpp \
CocoStudio/Armature/external_tool/GLES-Render.cpp \
CocoStudio/Armature/physics/CCColliderDetector.cpp \
CocoStudio/Armature/physics/CCPhysicsWorld.cpp \
CocoStudio/Armature/utils/CCArmatureDataManager.cpp \
CocoStudio/Armature/utils/CCDataReaderHelper.cpp \
CocoStudio/Armature/utils/CCSpriteFrameCacheHelper.cpp \
CocoStudio/Armature/utils/CCTransformHelp.cpp \
CocoStudio/Armature/utils/CCTweenFunction.cpp \
CocoStudio/Armature/utils/CCUtilMath.cpp \
CocoStudio/Components/CCComAttribute.cpp \
CocoStudio/Components/CCComAudio.cpp \
CocoStudio/Components/CCComController.cpp \
CocoStudio/Components/CCComRender.cpp \
CocoStudio/Components/CCInputDelegate.cpp \
CocoStudio/Json/CSContentJsonDictionary.cpp \
CocoStudio/Json/DictionaryHelper.cpp \
CocoStudio/Json/lib_json/json_value.cpp \
CocoStudio/Json/lib_json/json_reader.cpp \
CocoStudio/Json/lib_json/json_writer.cpp \
CocoStudio/Reader/CCSSceneReader.cpp \
spine/Animation.cpp \
spine/AnimationState.cpp \
spine/AnimationStateData.cpp \

View File

@ -1,375 +0,0 @@
/*
* Copyright (c) 2012 Chukong Technologies, Inc.
*
* http://www.cocostudio.com
* http://tools.cocoachina.com
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <iostream>
#include "CSContentJsonDictionary.h"
namespace cs {
CSJsonDictionary::CSJsonDictionary()
{
_value.clear();
}
CSJsonDictionary::~CSJsonDictionary()
{
_value.clear();
}
void CSJsonDictionary::initWithDescription(const char *pszDescription)
{
CSJson::Reader cReader;
_value.clear();
if (pszDescription && *pszDescription)
{
std::string strValue = pszDescription;
cReader.parse(strValue, _value, false);
}
}
void CSJsonDictionary::initWithValue(CSJson::Value& value)
{
_value = value;
}
void CSJsonDictionary::insertItem(const char *pszKey, int nValue)
{
_value[pszKey] = nValue;
}
void CSJsonDictionary::insertItem(const char *pszKey, double fValue)
{
_value[pszKey] = fValue;
}
void CSJsonDictionary::insertItem(const char *pszKey, const char * pszValue)
{
_value[pszKey] = pszValue;
}
void CSJsonDictionary::insertItem(const char *pszKey, bool bValue)
{
_value[pszKey] = bValue;
}
void CSJsonDictionary::insertItem(const char *pszKey, CSJsonDictionary * subDictionary)
{
if (subDictionary)
_value[pszKey] = subDictionary->_value;
}
bool CSJsonDictionary::deleteItem(const char *pszKey)
{
if(!_value.isMember(pszKey))
return false;
_value.removeMember(pszKey);
return true;
}
void CSJsonDictionary::cleanUp()
{
_value.clear();
}
bool CSJsonDictionary::isKeyValidate(const char *pszKey)
{
return _value.isMember(pszKey);
}
int CSJsonDictionary::getItemIntValue(const char *pszKey, int nDefaultValue)
{
if (!isKeyValidate(pszKey, _value) || !_value[pszKey].isNumeric())
return nDefaultValue;
return _value[pszKey].asInt();
}
double CSJsonDictionary::getItemFloatValue(const char *pszKey, double fDefaultValue)
{
if (!isKeyValidate(pszKey, _value) || !_value[pszKey].isNumeric())
return fDefaultValue;
return _value[pszKey].asDouble();
}
const char * CSJsonDictionary::getItemStringValue(const char *pszKey)
{
if (!isKeyValidate(pszKey, _value) || !_value[pszKey].isString())
return NULL;
return _value[pszKey].asCString();
}
bool CSJsonDictionary::getItemBoolvalue(const char *pszKey, bool bDefaultValue)
{
if (!isKeyValidate(pszKey, _value) || !_value[pszKey].isBool())
return bDefaultValue;
return _value[pszKey].asBool();
}
CSJsonDictionary * CSJsonDictionary::getSubDictionary(const char *pszKey)
{
CSJsonDictionary * pNewDictionary;
if (!isKeyValidate(pszKey, _value) || (!_value[pszKey].isArray() &&
!_value[pszKey].isObject() &&
!_value[pszKey].isConvertibleTo(CSJson::arrayValue) &&
!_value[pszKey].isConvertibleTo(CSJson::objectValue)))
{
pNewDictionary = NULL;
}
else
{
pNewDictionary = new CSJsonDictionary();
pNewDictionary->initWithValue(_value[pszKey]);
}
return pNewDictionary;
}
std::string CSJsonDictionary::getDescription()
{
std::string strReturn = _value.toStyledString();
return strReturn;
}
bool CSJsonDictionary::insertItemToArray(const char *pszArrayKey, int nValue)
{
CSJson::Value array;
if(_value.isMember(pszArrayKey))
{
if (!_value[pszArrayKey].isArray() && !_value[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = _value[pszArrayKey];
}
array.append(nValue);
_value[pszArrayKey] = array;
return true;
}
bool CSJsonDictionary::insertItemToArray(const char *pszArrayKey, double fValue)
{
CSJson::Value array;
if(_value.isMember(pszArrayKey))
{
if (!_value[pszArrayKey].isArray() && !_value[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = _value[pszArrayKey];
}
array.append(fValue);
_value[pszArrayKey] = array;
return true;
}
bool CSJsonDictionary::insertItemToArray(const char *pszArrayKey, const char * pszValue)
{
CSJson::Value array;
if(_value.isMember(pszArrayKey))
{
if (!_value[pszArrayKey].isArray() && !_value[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = _value[pszArrayKey];
}
array.append(pszValue);
_value[pszArrayKey] = array;
return true;
}
bool CSJsonDictionary::insertItemToArray(const char *pszArrayKey, CSJsonDictionary * subDictionary)
{
CSJson::Value array;
if(_value.isMember(pszArrayKey))
{
if (!_value[pszArrayKey].isArray() && !_value[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = _value[pszArrayKey];
}
array.append(subDictionary->_value);
_value[pszArrayKey] = array;
return true;
}
int CSJsonDictionary::getItemCount()
{
return _value.size();
}
DicItemType CSJsonDictionary::getItemType(int nIndex)
{
return (DicItemType)_value[nIndex].type();
}
DicItemType CSJsonDictionary::getItemType(const char *pszKey)
{
return (DicItemType)_value[pszKey].type();
}
std::vector<std::string> CSJsonDictionary::getAllMemberNames()
{
return _value.getMemberNames();
}
int CSJsonDictionary::getArrayItemCount(const char *pszArrayKey)
{
int nRet = 0;
if (!isKeyValidate(pszArrayKey, _value) ||
(!_value[pszArrayKey].isArray() && !_value[pszArrayKey].isObject() &&
!_value[pszArrayKey].isConvertibleTo(CSJson::arrayValue) && !_value[pszArrayKey].isConvertibleTo(CSJson::objectValue)))
{
nRet = 0;
}
else
{
CSJson::Value arrayValue = _value[pszArrayKey];
nRet = arrayValue.size();
}
return nRet;
}
int CSJsonDictionary::getIntValueFromArray(const char *pszArrayKey, int nIndex, int nDefaultValue)
{
int nRet = nDefaultValue;
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isNumeric())
nRet = (*arrayValue)[nIndex].asInt();
}
return nRet;
}
double CSJsonDictionary::getFloatValueFromArray(const char *pszArrayKey, int nIndex, double fDefaultValue)
{
double fRet = fDefaultValue;
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isNumeric())
fRet = (*arrayValue)[nIndex].asDouble();
}
return fRet;
}
const char * CSJsonDictionary::getStringValueFromArray(const char *pszArrayKey, int nIndex)
{
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isString())
return (*arrayValue)[nIndex].asCString();
}
return NULL;
}
CSJsonDictionary * CSJsonDictionary::getSubItemFromArray(const char *pszArrayKey, int nIndex)
{
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isArray() || (*arrayValue)[nIndex].isObject())
{
CSJsonDictionary * pNewDictionary = new CSJsonDictionary();
pNewDictionary->initWithValue((*arrayValue)[nIndex]);
return pNewDictionary;
}
}
return NULL;
}
DicItemType CSJsonDictionary::getItemTypeFromArray(const char *pszArrayKey, int nIndex)
{
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
return (DicItemType)((*arrayValue)[nIndex].type());
return (DicItemType)CSJson::nullValue;
}
inline bool CSJsonDictionary::isKeyValidate(const char *pszKey, CSJson::Value& root)
{
if (root.isNull() || !root.isMember(pszKey))
return false;
return true;
}
inline CSJson::Value * CSJsonDictionary::validateArrayItem(const char *pszArrayKey, int nIndex)
{
if (!isKeyValidate(pszArrayKey, _value) && !_value[pszArrayKey].isArray() && !_value[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return NULL;
if (!_value[pszArrayKey].isValidIndex(nIndex))
return NULL;
return &_value[pszArrayKey];
}
}

View File

@ -23,7 +23,7 @@ THE SOFTWARE.
****************************************************************************/
#include "CCDatas.h"
#include "CCArmature/utils/CCUtilMath.h"
#include "../utils/CCUtilMath.h"
namespace cocos2d { namespace extension { namespace armature {

View File

@ -807,14 +807,14 @@ void DataReaderHelper::addDataFromJson(const char *filePath)
void DataReaderHelper::addDataFromJsonCache(const char *fileContent)
{
cs::CSJsonDictionary json;
cs::JsonDictionary json;
json.initWithDescription(fileContent);
// Decode armatures
int length = json.getArrayItemCount(ARMATURE_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *armatureDic = json.getSubItemFromArray(ARMATURE_DATA, i);
cs::JsonDictionary *armatureDic = json.getSubItemFromArray(ARMATURE_DATA, i);
ArmatureData *armatureData = decodeArmature(*armatureDic);
ArmatureDataManager::sharedArmatureDataManager()->addArmatureData(armatureData->name.c_str(), armatureData);
@ -825,7 +825,7 @@ void DataReaderHelper::addDataFromJsonCache(const char *fileContent)
length = json.getArrayItemCount(ANIMATION_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *animationDic = json.getSubItemFromArray(ANIMATION_DATA, i);
cs::JsonDictionary *animationDic = json.getSubItemFromArray(ANIMATION_DATA, i);
AnimationData *animationData = decodeAnimation(*animationDic);
ArmatureDataManager::sharedArmatureDataManager()->addAnimationData(animationData->name.c_str(), animationData);
@ -836,7 +836,7 @@ void DataReaderHelper::addDataFromJsonCache(const char *fileContent)
length = json.getArrayItemCount(TEXTURE_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *textureDic = json.getSubItemFromArray(TEXTURE_DATA, i);
cs::JsonDictionary *textureDic = json.getSubItemFromArray(TEXTURE_DATA, i);
TextureData *textureData = decodeTexture(*textureDic);
ArmatureDataManager::sharedArmatureDataManager()->addTextureData(textureData->name.c_str(), textureData);
@ -844,7 +844,7 @@ void DataReaderHelper::addDataFromJsonCache(const char *fileContent)
}
}
ArmatureData *DataReaderHelper::decodeArmature(cs::CSJsonDictionary &json)
ArmatureData *DataReaderHelper::decodeArmature(cs::JsonDictionary &json)
{
ArmatureData *armatureData = ArmatureData::create();
@ -857,7 +857,7 @@ ArmatureData *DataReaderHelper::decodeArmature(cs::CSJsonDictionary &json)
int length = json.getArrayItemCount(BONE_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(BONE_DATA, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(BONE_DATA, i);
armatureData->addBoneData(decodeBone(*dic));
delete dic;
@ -866,7 +866,7 @@ ArmatureData *DataReaderHelper::decodeArmature(cs::CSJsonDictionary &json)
return armatureData;
}
BoneData *DataReaderHelper::decodeBone(cs::CSJsonDictionary &json)
BoneData *DataReaderHelper::decodeBone(cs::JsonDictionary &json)
{
BoneData *boneData = BoneData::create();
@ -888,7 +888,7 @@ BoneData *DataReaderHelper::decodeBone(cs::CSJsonDictionary &json)
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(DISPLAY_DATA, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(DISPLAY_DATA, i);
boneData->addDisplayData(decodeBoneDisplay(*dic));
delete dic;
@ -897,7 +897,7 @@ BoneData *DataReaderHelper::decodeBone(cs::CSJsonDictionary &json)
return boneData;
}
DisplayData *DataReaderHelper::decodeBoneDisplay(cs::CSJsonDictionary &json)
DisplayData *DataReaderHelper::decodeBoneDisplay(cs::JsonDictionary &json)
{
DisplayType displayType = (DisplayType)json.getItemIntValue(A_DISPLAY_TYPE, CS_DISPLAY_SPRITE);
@ -963,7 +963,7 @@ DisplayData *DataReaderHelper::decodeBoneDisplay(cs::CSJsonDictionary &json)
return displayData;
}
AnimationData *DataReaderHelper::decodeAnimation(cs::CSJsonDictionary &json)
AnimationData *DataReaderHelper::decodeAnimation(cs::JsonDictionary &json)
{
AnimationData *aniData = AnimationData::create();
@ -977,7 +977,7 @@ AnimationData *DataReaderHelper::decodeAnimation(cs::CSJsonDictionary &json)
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(MOVEMENT_DATA, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(MOVEMENT_DATA, i);
aniData->addMovement(decodeMovement(*dic));
delete dic;
@ -986,7 +986,7 @@ AnimationData *DataReaderHelper::decodeAnimation(cs::CSJsonDictionary &json)
return aniData;
}
MovementData *DataReaderHelper::decodeMovement(cs::CSJsonDictionary &json)
MovementData *DataReaderHelper::decodeMovement(cs::JsonDictionary &json)
{
MovementData *movementData = MovementData::create();
@ -1005,7 +1005,7 @@ MovementData *DataReaderHelper::decodeMovement(cs::CSJsonDictionary &json)
int length = json.getArrayItemCount(MOVEMENT_BONE_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(MOVEMENT_BONE_DATA, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(MOVEMENT_BONE_DATA, i);
movementData->addMovementBoneData(decodeMovementBone(*dic));
delete dic;
@ -1014,7 +1014,7 @@ MovementData *DataReaderHelper::decodeMovement(cs::CSJsonDictionary &json)
return movementData;
}
MovementBoneData *DataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &json)
MovementBoneData *DataReaderHelper::decodeMovementBone(cs::JsonDictionary &json)
{
MovementBoneData *movementBoneData = MovementBoneData::create();
@ -1030,7 +1030,7 @@ MovementBoneData *DataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &jso
int length = json.getArrayItemCount(FRAME_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(FRAME_DATA, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(FRAME_DATA, i);
FrameData *frameData = decodeFrame(*dic);
movementBoneData->addFrameData(frameData);
//movementBoneData->duration += frameData->duration;
@ -1041,7 +1041,7 @@ MovementBoneData *DataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &jso
return movementBoneData;
}
FrameData *DataReaderHelper::decodeFrame(cs::CSJsonDictionary &json)
FrameData *DataReaderHelper::decodeFrame(cs::JsonDictionary &json)
{
FrameData *frameData = FrameData::create();
@ -1060,7 +1060,7 @@ FrameData *DataReaderHelper::decodeFrame(cs::CSJsonDictionary &json)
return frameData;
}
TextureData *DataReaderHelper::decodeTexture(cs::CSJsonDictionary &json)
TextureData *DataReaderHelper::decodeTexture(cs::JsonDictionary &json)
{
TextureData *textureData = TextureData::create();
@ -1078,7 +1078,7 @@ TextureData *DataReaderHelper::decodeTexture(cs::CSJsonDictionary &json)
int length = json.getArrayItemCount(CONTOUR_DATA);
for (int i = 0; i < length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(CONTOUR_DATA, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(CONTOUR_DATA, i);
textureData->contourDataList->addObject(decodeContour(*dic));
delete dic;
@ -1087,14 +1087,14 @@ TextureData *DataReaderHelper::decodeTexture(cs::CSJsonDictionary &json)
return textureData;
}
ContourData *DataReaderHelper::decodeContour(cs::CSJsonDictionary &json)
ContourData *DataReaderHelper::decodeContour(cs::JsonDictionary &json)
{
ContourData *contourData = ContourData::create();
int length = json.getArrayItemCount(VERTEX_POINT);
for (int i = length - 1; i >= 0; i--)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(VERTEX_POINT, i);
cs::JsonDictionary *dic = json.getSubItemFromArray(VERTEX_POINT, i);
ContourVertex2F *vertex = new ContourVertex2F(0, 0);
@ -1110,7 +1110,7 @@ ContourData *DataReaderHelper::decodeContour(cs::CSJsonDictionary &json)
return contourData;
}
void DataReaderHelper::decodeNode(BaseData *node, cs::CSJsonDictionary &json)
void DataReaderHelper::decodeNode(BaseData *node, cs::JsonDictionary &json)
{
node->x = json.getItemFloatValue(A_X, 0) * s_PositionReadScale;
node->y = json.getItemFloatValue(A_Y, 0) * s_PositionReadScale;
@ -1121,7 +1121,7 @@ void DataReaderHelper::decodeNode(BaseData *node, cs::CSJsonDictionary &json)
node->scaleX = json.getItemFloatValue(A_SCALE_X, 1);
node->scaleY = json.getItemFloatValue(A_SCALE_Y, 1);
cs::CSJsonDictionary *colorDic = json.getSubItemFromArray(COLOR_INFO, 0);
cs::JsonDictionary *colorDic = json.getSubItemFromArray(COLOR_INFO, 0);
if (colorDic)
{

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
#include "../datas/CCDatas.h"
#include "../utils/CCConstValue.h"
#include "../CCArmature.h"
#include "../external_tool/Json/CSContentJsonDictionary.h"
#include "../../Json/CSContentJsonDictionary.h"
namespace tinyxml2 { class XMLElement; }
@ -110,20 +110,20 @@ public:
static void addDataFromJson(const char *filePath);
static void addDataFromJsonCache(const char *fileContent);
static ArmatureData *decodeArmature(cs::CSJsonDictionary &json);
static BoneData *decodeBone(cs::CSJsonDictionary &json);
static DisplayData *decodeBoneDisplay(cs::CSJsonDictionary &json);
static ArmatureData *decodeArmature(cs::JsonDictionary &json);
static BoneData *decodeBone(cs::JsonDictionary &json);
static DisplayData *decodeBoneDisplay(cs::JsonDictionary &json);
static AnimationData *decodeAnimation(cs::CSJsonDictionary &json);
static MovementData *decodeMovement(cs::CSJsonDictionary &json);
static MovementBoneData *decodeMovementBone(cs::CSJsonDictionary &json);
static FrameData *decodeFrame(cs::CSJsonDictionary &json);
static AnimationData *decodeAnimation(cs::JsonDictionary &json);
static MovementData *decodeMovement(cs::JsonDictionary &json);
static MovementBoneData *decodeMovementBone(cs::JsonDictionary &json);
static FrameData *decodeFrame(cs::JsonDictionary &json);
static TextureData *decodeTexture(cs::CSJsonDictionary &json);
static TextureData *decodeTexture(cs::JsonDictionary &json);
static ContourData *decodeContour(cs::CSJsonDictionary &json);
static ContourData *decodeContour(cs::JsonDictionary &json);
static void decodeNode(BaseData *node, cs::CSJsonDictionary &json);
static void decodeNode(BaseData *node, cs::JsonDictionary &json);
};
}}} // namespace cocos2d { namespace extension { namespace armature {

View File

@ -28,12 +28,14 @@ NS_CC_EXT_BEGIN
ComAttribute::ComAttribute(void)
: _attributes(NULL)
, _jsonDict(NULL)
{
_name = "ComAttribute";
}
ComAttribute::~ComAttribute(void)
{
CC_SAFE_DELETE(_jsonDict);
CC_SAFE_RELEASE(_attributes);
}
@ -41,6 +43,8 @@ bool ComAttribute::init()
{
_attributes = Dictionary::create();
_attributes->retain();
_jsonDict = new cs::JsonDictionary();
return true;
}
@ -180,4 +184,9 @@ Object* ComAttribute::getObject(const char *key) const
return _attributes->objectForKey(key);
}
cs::JsonDictionary* ComAttribute::getDict() const
{
return _jsonDict;
}
NS_CC_EXT_END

View File

@ -28,6 +28,7 @@ THE SOFTWARE.
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include <string>
#include "../Json/CSContentJsonDictionary.h"
NS_CC_EXT_BEGIN
@ -55,8 +56,10 @@ public:
const char* getCString(const char *key) const;
Object* getObject(const char *key) const;
cs::JsonDictionary* getDict() const;
private:
Dictionary *_attributes;
cs::JsonDictionary *_jsonDict;
};

View File

@ -28,6 +28,8 @@ THE SOFTWARE.
NS_CC_EXT_BEGIN
ComAudio::ComAudio(void)
: _filePath("")
, _loop(false)
{
_name = "Audio";
}
@ -201,5 +203,24 @@ void ComAudio::unloadEffect(const char *pszFilePath)
CocosDenshion::SimpleAudioEngine::getInstance()->unloadEffect(pszFilePath);
}
void ComAudio::setFile(const char* pszFilePath)
{
_filePath.assign(pszFilePath);
}
void ComAudio::setLoop(bool bLoop)
{
_loop = bLoop;
}
const char* ComAudio::getFile()
{
return _filePath.c_str();
}
bool ComAudio::isLoop()
{
return _loop;
}
NS_CC_EXT_END

View File

@ -71,6 +71,13 @@ public:
void stopAllEffects();
void preloadEffect(const char* pszFilePath);
void unloadEffect(const char* pszFilePath);
void setFile(const char* pszFilePath);
const char* getFile();
void setLoop(bool bLoop);
bool isLoop();
private:
std::string _filePath;
bool _loop;
};
NS_CC_EXT_END

View File

@ -0,0 +1,79 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCComRender.h"
NS_CC_EXT_BEGIN
ComRender::ComRender(void)
: _render(NULL)
{
}
ComRender::ComRender(cocos2d::Node *node, const char *comName)
{
_render = node;
_name.assign(comName);
}
ComRender::~ComRender(void)
{
_render = NULL;
}
void ComRender::onEnter()
{
if (_owner != NULL)
{
_owner->addChild(_render);
}
}
void ComRender::onExit()
{
_render = NULL;
}
cocos2d::Node* ComRender::getNode()
{
return _render;
}
ComRender* ComRender::create(cocos2d::Node *pNode, const char *comName)
{
ComRender * pRet = new ComRender(pNode, comName);
if (pRet != NULL && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
NS_CC_EXT_END

View File

@ -0,0 +1,53 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_EXTENTIONS_CCCOMNODE_H__
#define __CC_EXTENTIONS_CCCOMNODE_H__
#include "cocos2d.h"
#include "cocos-ext.h"
#include "ExtensionMacros.h"
NS_CC_EXT_BEGIN
class ComRender : public cocos2d::Component
{
protected:
ComRender(void);
ComRender(cocos2d::Node *node, const char *comName);
virtual ~ComRender(void);
public:
virtual void onEnter();
virtual void onExit();
cocos2d::Node* getNode();
static ComRender* create(cocos2d::Node *pNode, const char *comName);
private:
cocos2d::Node *_render;
};
NS_CC_EXT_END
#endif // __FUNDATION__CCCOMPONENT_H__

View File

@ -0,0 +1,388 @@
/*
* Copyright (c) 2012 Chukong Technologies, Inc.
*
* http://www.cocostudio.com
* http://tools.cocoachina.com
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <iostream>
#include "CSContentJsonDictionary.h"
namespace cs {
JsonDictionary::JsonDictionary()
{
m_cValue.clear();
}
JsonDictionary::~JsonDictionary()
{
m_cValue.clear();
}
void JsonDictionary::initWithDescription(const char *pszDescription)
{
CSJson::Reader cReader;
m_cValue.clear();
if (pszDescription && *pszDescription)
{
std::string strValue = pszDescription;
cReader.parse(strValue, m_cValue, false);
}
}
void JsonDictionary::initWithValue(CSJson::Value& value)
{
m_cValue = value;
}
void JsonDictionary::insertItem(const char *pszKey, int nValue)
{
m_cValue[pszKey] = nValue;
}
void JsonDictionary::insertItem(const char *pszKey, double fValue)
{
m_cValue[pszKey] = fValue;
}
void JsonDictionary::insertItem(const char *pszKey, const char * pszValue)
{
m_cValue[pszKey] = pszValue;
}
void JsonDictionary::insertItem(const char *pszKey, bool bValue)
{
m_cValue[pszKey] = bValue;
}
void JsonDictionary::insertItem(const char *pszKey, JsonDictionary * subDictionary)
{
if (subDictionary)
m_cValue[pszKey] = subDictionary->m_cValue;
}
bool JsonDictionary::deleteItem(const char *pszKey)
{
if(!m_cValue.isMember(pszKey))
return false;
m_cValue.removeMember(pszKey);
return true;
}
void JsonDictionary::cleanUp()
{
m_cValue.clear();
}
bool JsonDictionary::isKeyValidate(const char *pszKey)
{
return m_cValue.isMember(pszKey);
}
int JsonDictionary::getItemIntValue(const char *pszKey, int nDefaultValue)
{
if (!isKeyValidate(pszKey, m_cValue) || !m_cValue[pszKey].isNumeric())
return nDefaultValue;
return m_cValue[pszKey].asInt();
}
double JsonDictionary::getItemFloatValue(const char *pszKey, double fDefaultValue)
{
if (!isKeyValidate(pszKey, m_cValue) || !m_cValue[pszKey].isNumeric())
return fDefaultValue;
return m_cValue[pszKey].asDouble();
}
const char * JsonDictionary::getItemStringValue(const char *pszKey)
{
if (!isKeyValidate(pszKey, m_cValue) || !m_cValue[pszKey].isString())
return NULL;
return m_cValue[pszKey].asCString();
}
bool JsonDictionary::getItemBoolvalue(const char *pszKey, bool bDefaultValue)
{
if (!isKeyValidate(pszKey, m_cValue) || !m_cValue[pszKey].isBool())
return bDefaultValue;
return m_cValue[pszKey].asBool();
}
JsonDictionary * JsonDictionary::getSubDictionary(const char *pszKey)
{
JsonDictionary * pNewDictionary;
if (!isKeyValidate(pszKey, m_cValue) || (!m_cValue[pszKey].isArray() &&
!m_cValue[pszKey].isObject() &&
!m_cValue[pszKey].isConvertibleTo(CSJson::arrayValue) &&
!m_cValue[pszKey].isConvertibleTo(CSJson::objectValue)))
{
pNewDictionary = NULL;
}
else
{
pNewDictionary = new JsonDictionary();
pNewDictionary->initWithValue(m_cValue[pszKey]);
}
return pNewDictionary;
}
std::string JsonDictionary::getDescription()
{
std::string strReturn = m_cValue.toStyledString();
return strReturn;
}
bool JsonDictionary::insertItemToArray(const char *pszArrayKey, int nValue)
{
CSJson::Value array;
if(m_cValue.isMember(pszArrayKey))
{
if (!m_cValue[pszArrayKey].isArray() && !m_cValue[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = m_cValue[pszArrayKey];
}
array.append(nValue);
m_cValue[pszArrayKey] = array;
return true;
}
bool JsonDictionary::insertItemToArray(const char *pszArrayKey, double fValue)
{
CSJson::Value array;
if(m_cValue.isMember(pszArrayKey))
{
if (!m_cValue[pszArrayKey].isArray() && !m_cValue[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = m_cValue[pszArrayKey];
}
array.append(fValue);
m_cValue[pszArrayKey] = array;
return true;
}
bool JsonDictionary::insertItemToArray(const char *pszArrayKey, const char * pszValue)
{
CSJson::Value array;
if(m_cValue.isMember(pszArrayKey))
{
if (!m_cValue[pszArrayKey].isArray() && !m_cValue[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = m_cValue[pszArrayKey];
}
array.append(pszValue);
m_cValue[pszArrayKey] = array;
return true;
}
bool JsonDictionary::insertItemToArray(const char *pszArrayKey, JsonDictionary * subDictionary)
{
CSJson::Value array;
if(m_cValue.isMember(pszArrayKey))
{
if (!m_cValue[pszArrayKey].isArray() && !m_cValue[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return false;
array = m_cValue[pszArrayKey];
}
array.append(subDictionary->m_cValue);
m_cValue[pszArrayKey] = array;
return true;
}
int JsonDictionary::getItemCount()
{
return m_cValue.size();
}
DicItemType JsonDictionary::getItemType(int nIndex)
{
return (DicItemType)m_cValue[nIndex].type();
}
DicItemType JsonDictionary::getItemType(const char *pszKey)
{
return (DicItemType)m_cValue[pszKey].type();
}
std::vector<std::string> JsonDictionary::getAllMemberNames()
{
return m_cValue.getMemberNames();
}
int JsonDictionary::getArrayItemCount(const char *pszArrayKey)
{
int nRet = 0;
if (!isKeyValidate(pszArrayKey, m_cValue) ||
(!m_cValue[pszArrayKey].isArray() && !m_cValue[pszArrayKey].isObject() &&
!m_cValue[pszArrayKey].isConvertibleTo(CSJson::arrayValue) && !m_cValue[pszArrayKey].isConvertibleTo(CSJson::objectValue)))
{
nRet = 0;
}
else
{
CSJson::Value arrayValue = m_cValue[pszArrayKey];
nRet = arrayValue.size();
}
return nRet;
}
int JsonDictionary::getIntValueFromArray(const char *pszArrayKey, int nIndex, int nDefaultValue)
{
int nRet = nDefaultValue;
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isNumeric())
nRet = (*arrayValue)[nIndex].asInt();
}
return nRet;
}
double JsonDictionary::getFloatValueFromArray(const char *pszArrayKey, int nIndex, double fDefaultValue)
{
double fRet = fDefaultValue;
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isNumeric())
fRet = (*arrayValue)[nIndex].asDouble();
}
return fRet;
}
bool JsonDictionary::getBoolValueFromArray(const char *pszArrayKey, int nIndex, bool bDefaultValue)
{
bool bRet = bDefaultValue;
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isNumeric())
bRet = (*arrayValue)[nIndex].asBool();
}
return bRet;
}
const char * JsonDictionary::getStringValueFromArray(const char *pszArrayKey, int nIndex)
{
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isString())
return (*arrayValue)[nIndex].asCString();
}
return NULL;
}
JsonDictionary * JsonDictionary::getSubItemFromArray(const char *pszArrayKey, int nIndex)
{
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
{
if ((*arrayValue)[nIndex].isArray() || (*arrayValue)[nIndex].isObject())
{
JsonDictionary * pNewDictionary = new JsonDictionary();
pNewDictionary->initWithValue((*arrayValue)[nIndex]);
return pNewDictionary;
}
}
return NULL;
}
DicItemType JsonDictionary::getItemTypeFromArray(const char *pszArrayKey, int nIndex)
{
CSJson::Value * arrayValue = validateArrayItem(pszArrayKey, nIndex);
if (arrayValue)
return (DicItemType)((*arrayValue)[nIndex].type());
return (DicItemType)CSJson::nullValue;
}
inline bool JsonDictionary::isKeyValidate(const char *pszKey, CSJson::Value& root)
{
if (root.isNull() || !root.isMember(pszKey))
return false;
return true;
}
inline CSJson::Value * JsonDictionary::validateArrayItem(const char *pszArrayKey, int nIndex)
{
if (!isKeyValidate(pszArrayKey, m_cValue) && !m_cValue[pszArrayKey].isArray() && !m_cValue[pszArrayKey].isConvertibleTo(CSJson::arrayValue))
return NULL;
if (!m_cValue[pszArrayKey].isValidIndex(nIndex))
return NULL;
return &m_cValue[pszArrayKey];
}
}

View File

@ -46,18 +46,18 @@ namespace cs {
EDIC_TYPEOBJECT
}DicItemType;
class CSJsonDictionary
class JsonDictionary
{
public:
CSJsonDictionary();
~CSJsonDictionary();
JsonDictionary();
~JsonDictionary();
public:
void initWithDescription(const char *pszDescription);
void insertItem(const char *pszKey, int nValue);
void insertItem(const char *pszKey, double fValue);
void insertItem(const char *pszKey, const char * pszValue);
void insertItem(const char *pszKey, CSJsonDictionary * subDictionary);
void insertItem(const char *pszKey, JsonDictionary * subDictionary);
void insertItem(const char *pszKey, bool bValue);
bool deleteItem(const char *pszKey);
void cleanUp();
@ -67,20 +67,21 @@ namespace cs {
double getItemFloatValue(const char *pszKey, double fDefaultValue);
const char * getItemStringValue(const char *pszKey);
bool getItemBoolvalue(const char *pszKey, bool bDefaultValue);
CSJsonDictionary * getSubDictionary(const char *pszKey);
JsonDictionary * getSubDictionary(const char *pszKey);
std::string getDescription();
bool insertItemToArray(const char *pszArrayKey, int nValue);
bool insertItemToArray(const char *pszArrayKey, double fValue);
bool insertItemToArray(const char *pszArrayKey, const char * pszValue);
bool insertItemToArray(const char *pszArrayKey, CSJsonDictionary * subDictionary);
bool insertItemToArray(const char *pszArrayKey, JsonDictionary * subDictionary);
int getArrayItemCount(const char *pszArrayKey);
int getIntValueFromArray(const char *pszArrayKey, int nIndex, int nDefaultValue);
double getFloatValueFromArray(const char *pszArrayKey, int nIndex, double fDefaultValue);
bool getBoolValueFromArray(const char *pszArrayKey, int nIndex, bool bDefaultValue);
const char * getStringValueFromArray(const char *pszArrayKey, int nIndex);
CSJsonDictionary *getSubItemFromArray(const char *pszArrayKey, int nIndex);
JsonDictionary *getSubItemFromArray(const char *pszArrayKey, int nIndex);
DicItemType getItemTypeFromArray(const char *pszArrayKey, int nIndex);
int getItemCount();
@ -89,7 +90,7 @@ namespace cs {
std::vector<std::string> getAllMemberNames();
protected:
CSJson::Value _value;
CSJson::Value m_cValue;
private:
void initWithValue(CSJson::Value& value);

View File

@ -0,0 +1,289 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "DictionaryHelper.h"
NS_CC_EXT_BEGIN
static DictionaryHelper* sharedHelper = NULL;
DictionaryHelper::DictionaryHelper()
{
}
DictionaryHelper::~DictionaryHelper()
{
}
DictionaryHelper* DictionaryHelper::shareHelper()
{
if (!sharedHelper) {
sharedHelper = new DictionaryHelper();
}
return sharedHelper;
}
void DictionaryHelper::purgeDictionaryHelper()
{
CC_SAFE_DELETE(sharedHelper);
}
cocos2d::Dictionary* DictionaryHelper::getSubDictionary(cocos2d::Dictionary* root,const char* key)
{
if (!root) {
return NULL;
}
cocos2d::Object* obj = root->objectForKey(key);
if (!obj) {
return NULL;
}
return (cocos2d::Dictionary*)(obj);
}
int DictionaryHelper::getIntValue(cocos2d::Dictionary* root,const char* key)
{
if (!root) {
return 0;
}
cocos2d::Object* obj = root->objectForKey(key);
if (!obj) {
return 0;
}
cocos2d::String* cstr = (cocos2d::String*)(obj);
return cstr->intValue();
}
float DictionaryHelper::getFloatValue(cocos2d::Dictionary* root,const char* key)
{
if (!root) {
return 0.0;
}
cocos2d::Object* obj = root->objectForKey(key);
if (!obj) {
return 0.0f;
}
cocos2d::String* cstr = (cocos2d::String*)(obj);
return cstr->floatValue();
}
const char* DictionaryHelper::getStringValue(cocos2d::Dictionary* root,const char* key)
{
if (!root) {
return NULL;
}
cocos2d::Object* obj = root->objectForKey(key);
if (!obj) {
return NULL;
}
cocos2d::String* cstr = (cocos2d::String*)(obj);
return cstr->_string.c_str();
}
bool DictionaryHelper::getBooleanValue(cocos2d::Dictionary* root,const char* key)
{
return this->getIntValue(root, key);
}
cocos2d::Array* DictionaryHelper::getArrayValue(cocos2d::Dictionary *root, const char *key)
{
if (!root) {
return NULL;
}
cocos2d::Object* obj = root->objectForKey(key);
if (!obj) {
return NULL;
}
cocos2d::Array* array = (cocos2d::Array*)(obj);
return array;
}
cocos2d::Object* DictionaryHelper::checkObjectExist(cocos2d::Dictionary *root, const char *key)
{
if (!root) {
return NULL;
}
return root->objectForKey(key);
}
int DictionaryHelper::objectToIntValue(cocos2d::Object *obj)
{
if (!obj)
{
return 0;
}
cocos2d::String* cstr = (cocos2d::String*)(obj);
return cstr->intValue();
}
float DictionaryHelper::objectToFloatValue(cocos2d::Object *obj)
{
if (!obj)
{
return 0.0f;
}
cocos2d::String* cstr = (cocos2d::String*)(obj);
return cstr->floatValue();
}
const char* DictionaryHelper::objectToStringValue(cocos2d::Object *obj)
{
if (!obj)
{
return NULL;
}
cocos2d::String* cstr = (cocos2d::String*)(obj);
return cstr->_string.c_str();
}
bool DictionaryHelper::objectToBooleanValue(cocos2d::Object *obj)
{
if (!obj)
{
return 0;
}
return this->objectToIntValue(obj);
}
cocos2d::Array* DictionaryHelper::objectToCCArray(cocos2d::Object *obj)
{
if (!obj)
{
return NULL;
}
cocos2d::Array* array = (cocos2d::Array*)(obj);
return array;
}
cs::JsonDictionary* DictionaryHelper::getSubDictionary_json(cs::JsonDictionary* root,const char* key)
{
if (!root)
{
return NULL;
}
return root->getSubDictionary(key);
}
int DictionaryHelper::getIntValue_json(cs::JsonDictionary* root,const char* key)
{
if (!root)
{
return 0;
}
return root->getItemIntValue(key, 0);
}
float DictionaryHelper::getFloatValue_json(cs::JsonDictionary* root,const char* key)
{
if (!root)
{
return 0.0f;
}
return root->getItemFloatValue(key, 0.0);
}
const char* DictionaryHelper::getStringValue_json(cs::JsonDictionary* root,const char* key)
{
if (!root)
{
return NULL;
}
return root->getItemStringValue(key);
}
bool DictionaryHelper::getBooleanValue_json(cs::JsonDictionary* root,const char* key)
{
if (!root)
{
return 0;
}
return root->getItemBoolvalue(key, false);
}
int DictionaryHelper::getArrayCount_json(cs::JsonDictionary* root,const char* key)
{
if (!root)
{
return 0;
}
return root->getArrayItemCount(key);
}
int DictionaryHelper::getIntValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx)
{
if (!root)
{
return 0;
}
return root->getIntValueFromArray(arrayKey, idx, 0);
}
float DictionaryHelper::getFloatValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx)
{
if (!root)
{
return 0.0f;
}
return root->getFloatValueFromArray(arrayKey, idx, 0.0);
}
bool DictionaryHelper::getBoolValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx)
{
if (!root)
{
return false;
}
return root->getBoolValueFromArray(arrayKey, idx, false);
}
const char* DictionaryHelper::getStringValueFromArray_json(cs::JsonDictionary *root, const char *arrayKey, int idx)
{
if (!root)
{
return NULL;
}
return root->getStringValueFromArray(arrayKey, idx);
}
cs::JsonDictionary* DictionaryHelper::getDictionaryFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx)
{
if (!root)
{
return NULL;
}
return root->getSubItemFromArray(arrayKey, idx);
}
bool DictionaryHelper::checkObjectExist_json(cs::JsonDictionary *root, const char *key)
{
if (!root)
{
return false;
}
return root->isKeyValidate(key);
}
NS_CC_EXT_END

View File

@ -0,0 +1,72 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __DICTIONARYHELPER_H__
#define __DICTIONARYHELPER_H__
#include "cocos2d.h"
#include "cocos-ext.h"
#include "ExtensionMacros.h"
#define DICTOOL DictionaryHelper::shareHelper()
NS_CC_EXT_BEGIN
class DictionaryHelper
{
public:
DictionaryHelper();
~DictionaryHelper();
static DictionaryHelper* shareHelper();
static void purgeDictionaryHelper();
cocos2d::CCDictionary* getSubDictionary(cocos2d::CCDictionary* root,const char* key);
int getIntValue(cocos2d::CCDictionary* root,const char* key);
float getFloatValue(cocos2d::CCDictionary* root,const char* key);
const char* getStringValue(cocos2d::CCDictionary* root,const char* key);
bool getBooleanValue(cocos2d::CCDictionary* root,const char* key);
cocos2d::CCArray* getArrayValue(cocos2d::CCDictionary* root,const char* key);
cocos2d::CCObject* checkObjectExist(cocos2d::CCDictionary* root,const char* key);
int objectToIntValue(cocos2d::CCObject* obj);
float objectToFloatValue(cocos2d::CCObject* obj);
const char* objectToStringValue(cocos2d::CCObject* obj);
bool objectToBooleanValue(cocos2d::CCObject* obj);
cocos2d::CCArray* objectToCCArray(cocos2d::CCObject* obj);
cs::JsonDictionary* getSubDictionary_json(cs::JsonDictionary* root,const char* key);
int getIntValue_json(cs::JsonDictionary* root,const char* key);
float getFloatValue_json(cs::JsonDictionary* root,const char* key);
const char* getStringValue_json(cs::JsonDictionary* root,const char* key);
bool getBooleanValue_json(cs::JsonDictionary* root,const char* key);
int getArrayCount_json(cs::JsonDictionary* root,const char* key);
int getIntValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx);
float getFloatValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx);
bool getBoolValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx);
const char* getStringValueFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx);
cs::JsonDictionary* getDictionaryFromArray_json(cs::JsonDictionary* root,const char* arrayKey,int idx);
bool checkObjectExist_json(cs::JsonDictionary* root,const char* key);
};
NS_CC_EXT_END
#endif /* defined(__CocoGUI__DictionaryHelper__) */

View File

@ -480,7 +480,12 @@ Value::~Value()
#ifndef JSON_VALUE_USE_INTERNAL_MAP
case arrayValue:
case objectValue:
if (value_.map_ != NULL)
{
value_.map_->clear();
delete value_.map_;
value_.map_ = NULL;
}
break;
#else
case arrayValue:
@ -1028,12 +1033,17 @@ Value::clear()
case arrayValue:
case objectValue:
// value_.map_->clear();
if (!value_.map_)
if (value_.map_ != NULL)
{
value_.map_->clear();
delete value_.map_;
value_.map_ = NULL;
}
if (value_.string_ != NULL)
{
delete value_.string_;
value_.string_ = NULL;
}
break;
#else
case arrayValue:

View File

@ -0,0 +1,397 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCSSceneReader.h"
#include "cocos-ext.h"
NS_CC_EXT_BEGIN
SceneReader* SceneReader::s_sharedReader = NULL;
SceneReader::SceneReader()
{
}
SceneReader::~SceneReader()
{
}
const char* SceneReader::sceneReaderVersion()
{
return "0.1.0.0";
}
cocos2d::Node* SceneReader::createNodeWithSceneFile(const char* pszFileName)
{
unsigned long size = 0;
const char* pData = 0;
cocos2d::Node *pNode = NULL;
do {
CC_BREAK_IF(pszFileName == NULL);
std::string strFileName(pszFileName);
if (std::string::npos != strFileName.find_last_of('/'))
{
strFileName = strFileName.substr(0, strFileName.find_last_of('/') + 1);
cocos2d::CCFileUtils::sharedFileUtils()->addSearchPath(strFileName.c_str());
}
pData = (char*)(cocos2d::CCFileUtils::sharedFileUtils()->getFileData(pszFileName, "r", &size));
CC_BREAK_IF(pData == NULL || strcmp(pData, "") == 0);
cs::JsonDictionary *jsonDict = new cs::JsonDictionary();
jsonDict->initWithDescription(pData);
pNode = createObject(jsonDict,NULL);
CC_SAFE_DELETE(jsonDict);
} while (0);
return pNode;
}
Node* SceneReader::createObject(cs::JsonDictionary * inputFiles, Node* parenet)
{
const char *className = inputFiles->getItemStringValue("classname");
if(strcmp(className, "CCNode") == 0)
{
Node* gb = NULL;
if(NULL == parenet)
{
gb = Node::create();
}
else
{
gb = Node::create();
parenet->addChild(gb);
}
setPropertyFromJsonDict(gb, inputFiles);
int count = inputFiles->getArrayItemCount("components");
for (int i = 0; i < count; i++)
{
cs::JsonDictionary * subDict = inputFiles->getSubItemFromArray("components", i);
if (!subDict)
{
CC_SAFE_DELETE(subDict);
break;
}
const char *comName = subDict->getItemStringValue("classname");
const char *pComName = subDict->getItemStringValue("name");
cs::JsonDictionary *fileData = subDict->getSubDictionary("fileData");
std::string pPath;
std::string pPlistFile;
int nResType = 0;
if (fileData != NULL)
{
const char *file = fileData->getItemStringValue("path");
nResType = fileData->getItemIntValue("resourceType", -1);
const char *plistFile = fileData->getItemStringValue("plistFile");
if (file != NULL)
{
pPath.append(cocos2d::CCFileUtils::sharedFileUtils()->fullPathForFilename(file));
}
if (plistFile != NULL)
{
pPlistFile.append(cocos2d::CCFileUtils::sharedFileUtils()->fullPathForFilename(plistFile));
}
CC_SAFE_DELETE(fileData);
}
if (comName != NULL && strcmp(comName, "CCSprite") == 0)
{
cocos2d::Sprite *pSprite = NULL;
if (nResType == 0)
{
if (pPath.find(".png") == pPath.npos)
{
continue;
}
pSprite = Sprite::create(pPath.c_str());
}
else if (nResType == 1)
{
std::string pngFile = pPlistFile;
std::string::size_type pos = pngFile.find(".plist");
if (pos == pPath.npos)
{
continue;
}
pngFile.replace(pos, pngFile.length(), ".png");
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile(pPlistFile.c_str(), pngFile.c_str());
pSprite = Sprite::createWithSpriteFrameName(pPath.c_str());
}
else
{
continue;
}
ComRender *pRender = ComRender::create(pSprite, "CCSprite");
if (pComName != NULL)
{
pRender->setName(pComName);
}
gb->addComponent(pRender);
}
else if(comName != NULL && strcmp(comName, "CCTMXTiledMap") == 0)
{
cocos2d::TMXTiledMap *pTmx = NULL;
if (nResType == 0)
{
if (pPath.find(".tmx") == pPath.npos)
{
continue;
}
pTmx = TMXTiledMap::create(pPath.c_str());
}
else
{
continue;
}
ComRender *pRender = ComRender::create(pTmx, "CCTMXTiledMap");
if (pComName != NULL)
{
pRender->setName(pComName);
}
gb->addComponent(pRender);
}
else if(comName != NULL && strcmp(comName, "CCParticleSystemQuad") == 0)
{
std::string::size_type pos = pPath.find(".plist");
if (pos == pPath.npos)
{
continue;
}
cocos2d::ParticleSystemQuad *pParticle = NULL;
if (nResType == 0)
{
pParticle = ParticleSystemQuad::create(pPath.c_str());
}
else
{
CCLog("unknown resourcetype on CCParticleSystemQuad!");
}
pParticle->setPosition(0, 0);
ComRender *pRender = ComRender::create(pParticle, "CCParticleSystemQuad");
if (pComName != NULL)
{
pRender->setName(pComName);
}
gb->addComponent(pRender);
}
else if(comName != NULL && strcmp(comName, "CCArmature") == 0)
{
continue;
if (nResType != 0)
{
continue;
}
std::string reDir = pPath;
std::string file_path = "";
size_t pos = reDir.find_last_of('/');
if (pos != std::string::npos)
{
file_path = reDir.substr(0, pos+1);
}
unsigned long size = 0;
const char *des = (char*)(cocos2d::FileUtils::sharedFileUtils()->getFileData(pPath.c_str(),"r" , &size));
cs::JsonDictionary *jsonDict = new cs::JsonDictionary();
jsonDict->initWithDescription(des);
if(NULL == des || strcmp(des, "") == 0)
{
CCLog("read json file[%s] error!\n", pPath.c_str());
}
int childrenCount = DICTOOL->getArrayCount_json(jsonDict, "armature_data");
cs::JsonDictionary* subData = DICTOOL->getDictionaryFromArray_json(jsonDict, "armature_data", 0);
const char *name = DICTOOL->getStringValue_json(subData, "name");
childrenCount = DICTOOL->getArrayCount_json(jsonDict, "config_file_path");
for (int i = 0; i < childrenCount; ++i)
{
const char* plist = DICTOOL->getStringValueFromArray_json(jsonDict, "config_file_path", i);
std::string plistpath;
plistpath += file_path;
plistpath.append(plist);
cocos2d::CCDictionary *root = CCDictionary::createWithContentsOfFile(plistpath.c_str());
CCDictionary* metadata = DICTOOL->getSubDictionary(root, "metadata");
const char* textureFileName = DICTOOL->getStringValue(metadata, "textureFileName");
std::string textupath;
textupath += file_path;
textupath.append(textureFileName);
cocos2d::extension::armature::CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(textupath.c_str(), plistpath.c_str(), pPath.c_str());
}
cocos2d::extension::armature::Armature *pAr = cocos2d::extension::armature::Armature::create(name);
ComRender *pRender = ComRender::create(pAr, "CCArmature");
if (pComName != NULL)
{
pRender->setName(pComName);
}
gb->addComponent(pRender);
const char *actionName = subDict->getItemStringValue("selectedactionname");
if (actionName != NULL && pAr->getAnimation() != NULL)
{
pAr->getAnimation()->play(actionName);
}
CC_SAFE_DELETE(jsonDict);
CC_SAFE_DELETE(subData);
CC_SAFE_DELETE_ARRAY(des);
}
else if(comName != NULL && strcmp(comName, "CCComAudio") == 0)
{
CCComAudio *pAudio = NULL;
if (nResType == 0)
{
pAudio = CCComAudio::create();
}
else
{
continue;
}
pAudio->preloadEffect(pPath.c_str());
gb->addComponent(pAudio);
}
else if(comName != NULL && strcmp(comName, "CCComAttribute") == 0)
{
ComAttribute *pAttribute = NULL;
if (nResType == 0)
{
pAttribute = ComAttribute::create();
unsigned long size = 0;
const char* pData = 0;
pData = (char*)(cocos2d::CCFileUtils::sharedFileUtils()->getFileData(pPath.c_str(), "r", &size));
if(pData != NULL && strcmp(pData, "") != 0)
{
pAttribute->getDict()->initWithDescription(pData);
}
}
else
{
CCLog("unknown resourcetype on CCComAttribute!");
continue;
}
gb->addComponent(pAttribute);
}
else if (comName != NULL && strcmp(comName, "CCBackgroundAudio") == 0)
{
ComAudio *pAudio = NULL;
if (nResType == 0)
{
pAudio = CCComAudio::create();
}
else
{
continue;
}
pAudio->preloadBackgroundMusic(pPath.c_str());
pAudio->setFile(pPath.c_str());
bool bLoop = subDict->getItemIntValue("loop", 0);
pAudio->setLoop(bLoop);
gb->addComponent(pAudio);
pAudio->playBackgroundMusic(pPath.c_str(), bLoop);
}
else if(comName != NULL && strcmp(comName, "GUIComponent") == 0)
{
/* cocos2d::extension::UILayer *pLayer = cocos2d::extension::UILayer::create();
pLayer->scheduleUpdate();
UIWidget* widget=cocos2d::extension::UIHelper::instance()->createWidgetFromJsonFile(pPath.c_str());
pLayer->addWidget(widget);
CCComRender *pRender = CCComRender::create(pLayer, "GUIComponent");
if (pComName != NULL)
{
pRender->setName(pComName);
}
gb->addComponent(pRender);*/
}
CC_SAFE_DELETE(subDict);
}
for (int i = 0; i < inputFiles->getArrayItemCount("gameobjects"); i++)
{
cs::JsonDictionary * subDict = inputFiles->getSubItemFromArray("gameobjects", i);
if (!subDict)
{
break;
}
createObject(subDict, gb);
CC_SAFE_DELETE(subDict);
}
return gb;
}
return NULL;
}
void SceneReader::setPropertyFromJsonDict(cocos2d::Node *node, cs::JsonDictionary* dict)
{
int x = dict->getItemIntValue("x", 0);
int y = dict->getItemIntValue("y", 0);
node->setPosition(ccp(x, y));
bool bVisible = (bool)(dict->getItemIntValue("visible", 1));
node->setVisible(bVisible);
int nTag = dict->getItemIntValue("objecttag", -1);
node->setTag(nTag);
int nZorder = dict->getItemIntValue("zorder", 0);
node->setZOrder(nZorder);
float fScaleX = dict->getItemFloatValue("scalex", 1.0);
float fScaleY = dict->getItemFloatValue("scaley", 1.0);
node->setScaleX(fScaleX);
node->setScaleY(fScaleY);
float fRotationZ = dict->getItemIntValue("rotation", 0);
node->setRotation(fRotationZ);
}
SceneReader* SceneReader::sharedSceneReader()
{
if (s_sharedReader == NULL)
{
s_sharedReader = new SceneReader();
}
return s_sharedReader;
}
void SceneReader::purgeSceneReader()
{
CC_SAFE_DELETE(s_sharedReader);
cocos2d::extension::DictionaryHelper::shareHelper()->purgeDictionaryHelper();
}
NS_CC_EXT_END

View File

@ -0,0 +1,56 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCSSCENEREADER_H__
#define __CCSSCENEREADER_H__
#include "cocos2d.h"
#include "cocos-ext.h"
#include "ExtensionMacros.h"
NS_CC_EXT_BEGIN
class SceneReader
{
public:
SceneReader(void);
~SceneReader(void);
public:
static SceneReader* sharedSceneReader();
void purgeSceneReader();
static const char* sceneReaderVersion();
cocos2d::Node* createNodeWithSceneFile(const char *pszFileName);
private:
cocos2d::Node* createObject(cs::JsonDictionary * inputFiles, cocos2d::Node* parent);
void setPropertyFromJsonDict(cocos2d::Node *node, cs::JsonDictionary* dict);
private:
static SceneReader* s_sharedReader;
};
NS_CC_EXT_END
#endif

View File

@ -50,9 +50,34 @@
#include "spine/spine-cocos2dx.h"
#include "Components/CCComAttribute.h"
#include "Components/CCComAudio.h"
#include "Components/CCComController.h"
#include "CocoStudio/Armature/CCArmature.h"
#include "CocoStudio/Armature/CCBone.h"
#include "CocoStudio/Armature/animation/CCArmatureAnimation.h"
#include "CocoStudio/Armature/datas/CCDatas.h"
#include "CocoStudio/Armature/display/CCBatchNode.h"
#include "CocoStudio/Armature/display/CCDecorativeDisplay.h"
#include "CocoStudio/Armature/display/CCDisplayManager.h"
#include "CocoStudio/Armature/display/CCSkin.h"
#include "CocoStudio/Armature/physics/CCColliderDetector.h"
#include "CocoStudio/Armature/physics/CCPhysicsWorld.h"
#include "CocoStudio/Armature/utils/CCArmatureDataManager.h"
#include "CocoStudio/Armature/utils/CCConstValue.h"
#include "CocoStudio/Armature/utils/CCDataReaderHelper.h"
#include "CocoStudio/Armature/utils/CCTweenFunction.h"
#include "CocoStudio/Armature/utils/CCArmatureDataManager.h"
#include "CocoStudio/Armature/external_tool/sigslot.h"
#include "CocoStudio/Components/CCComAttribute.h"
#include "CocoStudio/Components/CCComAudio.h"
#include "CocoStudio/Components/CCComController.h"
#include "CocoStudio/Components/CCComRender.h"
#include "CocoStudio/Json/CSContentJsonDictionary.h"
#include "CocoStudio/Json/DictionaryHelper.h"
#include "CocoStudio/Reader/CCSSceneReader.h"
#include "CCDeprecated-ext.h"

View File

@ -93,32 +93,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\AssetsManager\AssetsManager.cpp" />
<ClCompile Include="..\CCArmature\animation\CCArmatureAnimation.cpp" />
<ClCompile Include="..\CCArmature\animation\CCProcessBase.cpp" />
<ClCompile Include="..\CCArmature\animation\CCTween.cpp" />
<ClCompile Include="..\CCArmature\CCArmature.cpp" />
<ClCompile Include="..\CCArmature\CCBone.cpp" />
<ClCompile Include="..\CCArmature\datas\CCDatas.cpp" />
<ClCompile Include="..\CCArmature\display\CCBatchNode.cpp" />
<ClCompile Include="..\CCArmature\display\CCDecorativeDisplay.cpp" />
<ClCompile Include="..\CCArmature\display\CCDisplayFactory.cpp" />
<ClCompile Include="..\CCArmature\display\CCDisplayManager.cpp" />
<ClCompile Include="..\CCArmature\display\CCShaderNode.cpp" />
<ClCompile Include="..\CCArmature\display\CCSkin.cpp" />
<ClCompile Include="..\CCArmature\external_tool\CCTexture2DMutable.cpp" />
<ClCompile Include="..\CCArmature\external_tool\GLES-Render.cpp" />
<ClCompile Include="..\CCArmature\external_tool\Json\CSContentJsonDictionary.cpp" />
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_reader.cpp" />
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_value.cpp" />
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_writer.cpp" />
<ClCompile Include="..\CCArmature\physics\CCColliderDetector.cpp" />
<ClCompile Include="..\CCArmature\physics\CCPhysicsWorld.cpp" />
<ClCompile Include="..\CCArmature\utils\CCArmatureDataManager.cpp" />
<ClCompile Include="..\CCArmature\utils\CCDataReaderHelper.cpp" />
<ClCompile Include="..\CCArmature\utils\CCSpriteFrameCacheHelper.cpp" />
<ClCompile Include="..\CCArmature\utils\CCTransformHelp.cpp" />
<ClCompile Include="..\CCArmature\utils\CCTweenFunction.cpp" />
<ClCompile Include="..\CCArmature\utils\CCUtilMath.cpp" />
<ClCompile Include="..\CCBReader\CCBAnimationManager.cpp" />
<ClCompile Include="..\CCBReader\CCBFileLoader.cpp" />
<ClCompile Include="..\CCBReader\CCBKeyframe.cpp" />
@ -143,10 +117,38 @@
<ClCompile Include="..\CCBReader\CCScrollViewLoader.cpp" />
<ClCompile Include="..\CCBReader\CCSpriteLoader.cpp" />
<ClCompile Include="..\CCDeprecated-ext.cpp" />
<ClCompile Include="..\Components\CCComAttribute.cpp" />
<ClCompile Include="..\Components\CCComAudio.cpp" />
<ClCompile Include="..\Components\CCComController.cpp" />
<ClCompile Include="..\Components\CCInputDelegate.cpp" />
<ClCompile Include="..\CocoStudio\Armature\animation\CCArmatureAnimation.cpp" />
<ClCompile Include="..\CocoStudio\Armature\animation\CCProcessBase.cpp" />
<ClCompile Include="..\CocoStudio\Armature\animation\CCTween.cpp" />
<ClCompile Include="..\CocoStudio\Armature\CCArmature.cpp" />
<ClCompile Include="..\CocoStudio\Armature\CCBone.cpp" />
<ClCompile Include="..\CocoStudio\Armature\datas\CCDatas.cpp" />
<ClCompile Include="..\CocoStudio\Armature\display\CCBatchNode.cpp" />
<ClCompile Include="..\CocoStudio\Armature\display\CCDecorativeDisplay.cpp" />
<ClCompile Include="..\CocoStudio\Armature\display\CCDisplayFactory.cpp" />
<ClCompile Include="..\CocoStudio\Armature\display\CCDisplayManager.cpp" />
<ClCompile Include="..\CocoStudio\Armature\display\CCShaderNode.cpp" />
<ClCompile Include="..\CocoStudio\Armature\display\CCSkin.cpp" />
<ClCompile Include="..\CocoStudio\Armature\external_tool\GLES-Render.cpp" />
<ClCompile Include="..\CocoStudio\Armature\physics\CCColliderDetector.cpp" />
<ClCompile Include="..\CocoStudio\Armature\physics\CCPhysicsWorld.cpp" />
<ClCompile Include="..\CocoStudio\Armature\utils\CCArmatureDataManager.cpp" />
<ClCompile Include="..\CocoStudio\Armature\utils\CCDataReaderHelper.cpp" />
<ClCompile Include="..\CocoStudio\Armature\utils\CCSpriteFrameCacheHelper.cpp" />
<ClCompile Include="..\CocoStudio\Armature\utils\CCTransformHelp.cpp" />
<ClCompile Include="..\CocoStudio\Armature\utils\CCTweenFunction.cpp" />
<ClCompile Include="..\CocoStudio\Armature\utils\CCUtilMath.cpp" />
<ClCompile Include="..\CocoStudio\Components\CCComAttribute.cpp" />
<ClCompile Include="..\CocoStudio\Components\CCComAudio.cpp" />
<ClCompile Include="..\CocoStudio\Components\CCComController.cpp" />
<ClCompile Include="..\CocoStudio\Components\CCComRender.cpp" />
<ClCompile Include="..\CocoStudio\Components\CCInputDelegate.cpp" />
<ClCompile Include="..\CocoStudio\Json\CSContentJsonDictionary.cpp" />
<ClCompile Include="..\CocoStudio\Json\DictionaryHelper.cpp" />
<ClCompile Include="..\CocoStudio\Json\lib_json\json_reader.cpp" />
<ClCompile Include="..\CocoStudio\Json\lib_json\json_value.cpp" />
<ClCompile Include="..\CocoStudio\Json\lib_json\json_writer.cpp" />
<ClCompile Include="..\CocoStudio\Reader\CCSSceneReader.cpp" />
<ClCompile Include="..\GUI\CCControlExtension\CCControl.cpp" />
<ClCompile Include="..\GUI\CCControlExtension\CCControlButton.cpp" />
<ClCompile Include="..\GUI\CCControlExtension\CCControlColourPicker.cpp" />
@ -196,42 +198,6 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\AssetsManager\AssetsManager.h" />
<ClInclude Include="..\CCArmature\animation\CCArmatureAnimation.h" />
<ClInclude Include="..\CCArmature\animation\CCProcessBase.h" />
<ClInclude Include="..\CCArmature\animation\CCTween.h" />
<ClInclude Include="..\CCArmature\CCArmature.h" />
<ClInclude Include="..\CCArmature\CCBone.h" />
<ClInclude Include="..\CCArmature\datas\CCDatas.h" />
<ClInclude Include="..\CCArmature\display\CCBatchNode.h" />
<ClInclude Include="..\CCArmature\display\CCDecorativeDisplay.h" />
<ClInclude Include="..\CCArmature\display\CCDisplayFactory.h" />
<ClInclude Include="..\CCArmature\display\CCDisplayManager.h" />
<ClInclude Include="..\CCArmature\display\CCShaderNode.h" />
<ClInclude Include="..\CCArmature\display\CCSkin.h" />
<ClInclude Include="..\CCArmature\external_tool\CCTexture2DMutable.h" />
<ClInclude Include="..\CCArmature\external_tool\GLES-Render.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\CSContentJsonDictionary.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\autolink.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\config.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\features.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\forwards.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\json_batchallocator.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\json_lib.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\json_tool.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\reader.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\value.h" />
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\writer.h" />
<ClInclude Include="..\CCArmature\external_tool\sigslot.h" />
<ClInclude Include="..\CCArmature\physics\CCColliderDetector.h" />
<ClInclude Include="..\CCArmature\physics\CCPhysicsWorld.h" />
<ClInclude Include="..\CCArmature\utils\CCArmatureDataManager.h" />
<ClInclude Include="..\CCArmature\utils\CCArmatureDefine.h" />
<ClInclude Include="..\CCArmature\utils\CCConstValue.h" />
<ClInclude Include="..\CCArmature\utils\CCDataReaderHelper.h" />
<ClInclude Include="..\CCArmature\utils\CCSpriteFrameCacheHelper.h" />
<ClInclude Include="..\CCArmature\utils\CCTransformHelp.h" />
<ClInclude Include="..\CCArmature\utils\CCTweenFunction.h" />
<ClInclude Include="..\CCArmature\utils\CCUtilMath.h" />
<ClInclude Include="..\CCBReader\CCBAnimationManager.h" />
<ClInclude Include="..\CCBReader\CCBFileLoader.h" />
<ClInclude Include="..\CCBReader\CCBKeyframe.h" />
@ -259,10 +225,48 @@
<ClInclude Include="..\CCBReader\CCScale9SpriteLoader.h" />
<ClInclude Include="..\CCBReader\CCScrollViewLoader.h" />
<ClInclude Include="..\CCBReader\CCSpriteLoader.h" />
<ClInclude Include="..\Components\CCComAttribute.h" />
<ClInclude Include="..\Components\CCComAudio.h" />
<ClInclude Include="..\Components\CCComController.h" />
<ClInclude Include="..\Components\CCInputDelegate.h" />
<ClInclude Include="..\CocoStudio\Armature\animation\CCArmatureAnimation.h" />
<ClInclude Include="..\CocoStudio\Armature\animation\CCProcessBase.h" />
<ClInclude Include="..\CocoStudio\Armature\animation\CCTween.h" />
<ClInclude Include="..\CocoStudio\Armature\CCArmature.h" />
<ClInclude Include="..\CocoStudio\Armature\CCBone.h" />
<ClInclude Include="..\CocoStudio\Armature\datas\CCDatas.h" />
<ClInclude Include="..\CocoStudio\Armature\display\CCBatchNode.h" />
<ClInclude Include="..\CocoStudio\Armature\display\CCDecorativeDisplay.h" />
<ClInclude Include="..\CocoStudio\Armature\display\CCDisplayFactory.h" />
<ClInclude Include="..\CocoStudio\Armature\display\CCDisplayManager.h" />
<ClInclude Include="..\CocoStudio\Armature\display\CCShaderNode.h" />
<ClInclude Include="..\CocoStudio\Armature\display\CCSkin.h" />
<ClInclude Include="..\CocoStudio\Armature\external_tool\GLES-Render.h" />
<ClInclude Include="..\CocoStudio\Armature\external_tool\sigslot.h" />
<ClInclude Include="..\CocoStudio\Armature\physics\CCColliderDetector.h" />
<ClInclude Include="..\CocoStudio\Armature\physics\CCPhysicsWorld.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCArmatureDataManager.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCArmatureDefine.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCConstValue.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCDataReaderHelper.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCSpriteFrameCacheHelper.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCTransformHelp.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCTweenFunction.h" />
<ClInclude Include="..\CocoStudio\Armature\utils\CCUtilMath.h" />
<ClInclude Include="..\CocoStudio\Components\CCComAttribute.h" />
<ClInclude Include="..\CocoStudio\Components\CCComAudio.h" />
<ClInclude Include="..\CocoStudio\Components\CCComController.h" />
<ClInclude Include="..\CocoStudio\Components\CCComRender.h" />
<ClInclude Include="..\CocoStudio\Components\CCInputDelegate.h" />
<ClInclude Include="..\CocoStudio\Json\CSContentJsonDictionary.h" />
<ClInclude Include="..\CocoStudio\Json\DictionaryHelper.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\autolink.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\config.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\features.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\forwards.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\json_batchallocator.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\json_lib.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\json_tool.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\reader.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\value.h" />
<ClInclude Include="..\CocoStudio\Json\lib_json\writer.h" />
<ClInclude Include="..\CocoStudio\Reader\CCSSceneReader.h" />
<ClInclude Include="..\GUI\CCControlExtension\CCControl.h" />
<ClInclude Include="..\GUI\CCControlExtension\CCControlButton.h" />
<ClInclude Include="..\GUI\CCControlExtension\CCControlColourPicker.h" />
@ -318,9 +322,10 @@
<ClInclude Include="Win32InputBox.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\CCArmature\external_tool\Json\lib_json\json_internalarray.inl" />
<None Include="..\CCArmature\external_tool\Json\lib_json\json_internalmap.inl" />
<None Include="..\CCArmature\external_tool\Json\lib_json\json_valueiterator.inl" />
<None Include="..\CocoStudio\Json\lib_json\json_internalarray.inl" />
<None Include="..\CocoStudio\Json\lib_json\json_internalmap.inl" />
<None Include="..\CocoStudio\Json\lib_json\json_valueiterator.inl" />
<None Include="..\CocoStudio\Json\lib_json\sconscript" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -31,30 +31,42 @@
<Filter Include="network">
<UniqueIdentifier>{2a7741ff-87a5-41c8-8e51-d7a1cf0c8e4d}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature">
<UniqueIdentifier>{cf3469d5-421b-4990-a9be-4cd95129fb73}</UniqueIdentifier>
<Filter Include="CocoStudio">
<UniqueIdentifier>{87250d95-2afd-45e7-bc9d-760478c4e709}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\animation">
<UniqueIdentifier>{f48d1291-33fe-49a1-8f9f-4d203e782d4a}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\datas">
<UniqueIdentifier>{043f8489-822e-43c8-8d9d-5d171a701663}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\display">
<UniqueIdentifier>{b8c65820-b5c9-4bd6-83c8-180fdc6100fb}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\physics">
<UniqueIdentifier>{fa9a165e-cc7c-45e9-ae4f-cae3c2f16e6a}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\utils">
<UniqueIdentifier>{5e5b3d7d-62a7-493e-a130-ed72ee7c65f2}</UniqueIdentifier>
</Filter>
<Filter Include="Components">
<Filter Include="CocoStudio\Components">
<UniqueIdentifier>{5258a1e1-5d50-4fee-9216-da08d2ec19de}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\external_tool">
<Filter Include="CocoStudio\Armature">
<UniqueIdentifier>{cf3469d5-421b-4990-a9be-4cd95129fb73}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Armature\animation">
<UniqueIdentifier>{f48d1291-33fe-49a1-8f9f-4d203e782d4a}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Armature\datas">
<UniqueIdentifier>{043f8489-822e-43c8-8d9d-5d171a701663}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Armature\display">
<UniqueIdentifier>{b8c65820-b5c9-4bd6-83c8-180fdc6100fb}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Armature\physics">
<UniqueIdentifier>{fa9a165e-cc7c-45e9-ae4f-cae3c2f16e6a}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Armature\utils">
<UniqueIdentifier>{5e5b3d7d-62a7-493e-a130-ed72ee7c65f2}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Armature\external_tool">
<UniqueIdentifier>{bd365bbb-6972-4073-b268-8360df428166}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Json">
<UniqueIdentifier>{d797adcd-2e59-4486-944e-b3e7f3a954b8}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Reader">
<UniqueIdentifier>{a824cea6-86d7-4230-8738-513a869a1882}</UniqueIdentifier>
</Filter>
<Filter Include="CocoStudio\Json\lib_json">
<UniqueIdentifier>{d305abea-33cc-4ae8-b78d-b5fb59927e59}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\GUI\CCScrollView\CCScrollView.cpp">
@ -264,100 +276,106 @@
<ClCompile Include="..\network\Websocket.cpp">
<Filter>network</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\CCArmature.cpp">
<Filter>CCArmature</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\CCBone.cpp">
<Filter>CCArmature</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\animation\CCArmatureAnimation.cpp">
<Filter>CCArmature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\animation\CCProcessBase.cpp">
<Filter>CCArmature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\animation\CCTween.cpp">
<Filter>CCArmature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\datas\CCDatas.cpp">
<Filter>CCArmature\datas</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\display\CCBatchNode.cpp">
<Filter>CCArmature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\display\CCDecorativeDisplay.cpp">
<Filter>CCArmature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\display\CCDisplayFactory.cpp">
<Filter>CCArmature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\display\CCDisplayManager.cpp">
<Filter>CCArmature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\display\CCShaderNode.cpp">
<Filter>CCArmature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\display\CCSkin.cpp">
<Filter>CCArmature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\physics\CCColliderDetector.cpp">
<Filter>CCArmature\physics</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\physics\CCPhysicsWorld.cpp">
<Filter>CCArmature\physics</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\utils\CCArmatureDataManager.cpp">
<Filter>CCArmature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\utils\CCDataReaderHelper.cpp">
<Filter>CCArmature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\utils\CCSpriteFrameCacheHelper.cpp">
<Filter>CCArmature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\utils\CCTransformHelp.cpp">
<Filter>CCArmature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\utils\CCTweenFunction.cpp">
<Filter>CCArmature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\utils\CCUtilMath.cpp">
<Filter>CCArmature\utils</Filter>
</ClCompile>
<ClCompile Include="..\Components\CCComAttribute.cpp">
<Filter>Components</Filter>
</ClCompile>
<ClCompile Include="..\Components\CCComAudio.cpp">
<Filter>Components</Filter>
</ClCompile>
<ClCompile Include="..\Components\CCComController.cpp">
<Filter>Components</Filter>
</ClCompile>
<ClCompile Include="..\Components\CCInputDelegate.cpp">
<Filter>Components</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\CCTexture2DMutable.cpp">
<Filter>CCArmature\external_tool</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\GLES-Render.cpp">
<Filter>CCArmature\external_tool</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\Json\CSContentJsonDictionary.cpp">
<Filter>CCArmature\external_tool</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_reader.cpp">
<Filter>CCArmature\external_tool</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_value.cpp">
<Filter>CCArmature\external_tool</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_writer.cpp">
<Filter>CCArmature\external_tool</Filter>
</ClCompile>
<ClCompile Include="..\network\SocketIO.cpp">
<Filter>network</Filter>
</ClCompile>
<ClCompile Include="..\CCDeprecated-ext.cpp" />
<ClCompile Include="..\CocoStudio\Components\CCComAttribute.cpp">
<Filter>CocoStudio\Components</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Components\CCComAudio.cpp">
<Filter>CocoStudio\Components</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Components\CCComController.cpp">
<Filter>CocoStudio\Components</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Components\CCInputDelegate.cpp">
<Filter>CocoStudio\Components</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\animation\CCArmatureAnimation.cpp">
<Filter>CocoStudio\Armature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\animation\CCProcessBase.cpp">
<Filter>CocoStudio\Armature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\animation\CCTween.cpp">
<Filter>CocoStudio\Armature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\datas\CCDatas.cpp">
<Filter>CocoStudio\Armature\datas</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\display\CCBatchNode.cpp">
<Filter>CocoStudio\Armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\display\CCDecorativeDisplay.cpp">
<Filter>CocoStudio\Armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\display\CCDisplayFactory.cpp">
<Filter>CocoStudio\Armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\display\CCDisplayManager.cpp">
<Filter>CocoStudio\Armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\display\CCShaderNode.cpp">
<Filter>CocoStudio\Armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\display\CCSkin.cpp">
<Filter>CocoStudio\Armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\physics\CCColliderDetector.cpp">
<Filter>CocoStudio\Armature\physics</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\physics\CCPhysicsWorld.cpp">
<Filter>CocoStudio\Armature\physics</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\utils\CCArmatureDataManager.cpp">
<Filter>CocoStudio\Armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\utils\CCDataReaderHelper.cpp">
<Filter>CocoStudio\Armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\utils\CCSpriteFrameCacheHelper.cpp">
<Filter>CocoStudio\Armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\utils\CCTransformHelp.cpp">
<Filter>CocoStudio\Armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\utils\CCTweenFunction.cpp">
<Filter>CocoStudio\Armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\utils\CCUtilMath.cpp">
<Filter>CocoStudio\Armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\CCArmature.cpp">
<Filter>CocoStudio\Armature</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\CCBone.cpp">
<Filter>CocoStudio\Armature</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Json\CSContentJsonDictionary.cpp">
<Filter>CocoStudio\Json</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Json\DictionaryHelper.cpp">
<Filter>CocoStudio\Json</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Json\lib_json\json_reader.cpp">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Json\lib_json\json_value.cpp">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Json\lib_json\json_writer.cpp">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Reader\CCSSceneReader.cpp">
<Filter>CocoStudio\Reader</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Components\CCComRender.cpp">
<Filter>CocoStudio\Components</Filter>
</ClCompile>
<ClCompile Include="..\CocoStudio\Armature\external_tool\GLES-Render.cpp">
<Filter>CocoStudio\Armature\external_tool</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\GUI\CCScrollView\CCScrollView.h">
@ -596,139 +614,148 @@
<ClInclude Include="..\network\Websocket.h">
<Filter>network</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\CCArmature.h">
<Filter>CCArmature</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\CCBone.h">
<Filter>CCArmature</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\animation\CCArmatureAnimation.h">
<Filter>CCArmature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\animation\CCProcessBase.h">
<Filter>CCArmature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\animation\CCTween.h">
<Filter>CCArmature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\datas\CCDatas.h">
<Filter>CCArmature\datas</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\display\CCBatchNode.h">
<Filter>CCArmature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\display\CCDecorativeDisplay.h">
<Filter>CCArmature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\display\CCDisplayFactory.h">
<Filter>CCArmature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\display\CCDisplayManager.h">
<Filter>CCArmature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\display\CCShaderNode.h">
<Filter>CCArmature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\display\CCSkin.h">
<Filter>CCArmature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\physics\CCColliderDetector.h">
<Filter>CCArmature\physics</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\physics\CCPhysicsWorld.h">
<Filter>CCArmature\physics</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCArmatureDataManager.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCArmatureDefine.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCConstValue.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCDataReaderHelper.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCSpriteFrameCacheHelper.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCTransformHelp.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCTweenFunction.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\utils\CCUtilMath.h">
<Filter>CCArmature\utils</Filter>
</ClInclude>
<ClInclude Include="..\Components\CCComAttribute.h">
<Filter>Components</Filter>
</ClInclude>
<ClInclude Include="..\Components\CCComAudio.h">
<Filter>Components</Filter>
</ClInclude>
<ClInclude Include="..\Components\CCComController.h">
<Filter>Components</Filter>
</ClInclude>
<ClInclude Include="..\Components\CCInputDelegate.h">
<Filter>Components</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\CCTexture2DMutable.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\GLES-Render.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\sigslot.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\CSContentJsonDictionary.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\autolink.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\config.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\features.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\forwards.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\json_batchallocator.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\json_lib.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\json_tool.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\reader.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\value.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature\external_tool\Json\lib_json\writer.h">
<Filter>CCArmature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\network\SocketIO.h">
<Filter>network</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Components\CCComAttribute.h">
<Filter>CocoStudio\Components</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Components\CCComAudio.h">
<Filter>CocoStudio\Components</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Components\CCComController.h">
<Filter>CocoStudio\Components</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Components\CCInputDelegate.h">
<Filter>CocoStudio\Components</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\animation\CCArmatureAnimation.h">
<Filter>CocoStudio\Armature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\animation\CCProcessBase.h">
<Filter>CocoStudio\Armature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\animation\CCTween.h">
<Filter>CocoStudio\Armature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\datas\CCDatas.h">
<Filter>CocoStudio\Armature\datas</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\display\CCBatchNode.h">
<Filter>CocoStudio\Armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\display\CCDecorativeDisplay.h">
<Filter>CocoStudio\Armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\display\CCDisplayFactory.h">
<Filter>CocoStudio\Armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\display\CCDisplayManager.h">
<Filter>CocoStudio\Armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\display\CCShaderNode.h">
<Filter>CocoStudio\Armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\display\CCSkin.h">
<Filter>CocoStudio\Armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\external_tool\sigslot.h">
<Filter>CocoStudio\Armature\external_tool</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\physics\CCColliderDetector.h">
<Filter>CocoStudio\Armature\physics</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\physics\CCPhysicsWorld.h">
<Filter>CocoStudio\Armature\physics</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCArmatureDataManager.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCArmatureDefine.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCConstValue.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCDataReaderHelper.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCSpriteFrameCacheHelper.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCTransformHelp.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCTweenFunction.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\utils\CCUtilMath.h">
<Filter>CocoStudio\Armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\CCArmature.h">
<Filter>CocoStudio\Armature</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\CCBone.h">
<Filter>CocoStudio\Armature</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\CSContentJsonDictionary.h">
<Filter>CocoStudio\Json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\DictionaryHelper.h">
<Filter>CocoStudio\Json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\autolink.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\config.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\features.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\forwards.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\json_batchallocator.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\json_lib.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\json_tool.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\reader.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\value.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Json\lib_json\writer.h">
<Filter>CocoStudio\Json\lib_json</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Reader\CCSSceneReader.h">
<Filter>CocoStudio\Reader</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Components\CCComRender.h">
<Filter>CocoStudio\Components</Filter>
</ClInclude>
<ClInclude Include="..\CocoStudio\Armature\external_tool\GLES-Render.h">
<Filter>CocoStudio\Armature\external_tool</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\CCArmature\external_tool\Json\lib_json\json_internalarray.inl">
<Filter>CCArmature\external_tool</Filter>
<None Include="..\CocoStudio\Json\lib_json\json_internalarray.inl">
<Filter>CocoStudio\Json\lib_json</Filter>
</None>
<None Include="..\CCArmature\external_tool\Json\lib_json\json_internalmap.inl">
<Filter>CCArmature\external_tool</Filter>
<None Include="..\CocoStudio\Json\lib_json\json_internalmap.inl">
<Filter>CocoStudio\Json\lib_json</Filter>
</None>
<None Include="..\CCArmature\external_tool\Json\lib_json\json_valueiterator.inl">
<Filter>CCArmature\external_tool</Filter>
<None Include="..\CocoStudio\Json\lib_json\json_valueiterator.inl">
<Filter>CocoStudio\Json\lib_json</Filter>
</None>
<None Include="..\CocoStudio\Json\lib_json\sconscript">
<Filter>CocoStudio\Json\lib_json</Filter>
</None>
</ItemGroup>
</Project>