diff --git a/cocos/editor-support/cocostudio/CCActionManagerEx.cpp b/cocos/editor-support/cocostudio/CCActionManagerEx.cpp index 655ace9e3b..4c1f2bb824 100644 --- a/cocos/editor-support/cocostudio/CCActionManagerEx.cpp +++ b/cocos/editor-support/cocostudio/CCActionManagerEx.cpp @@ -74,7 +74,7 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V void ActionManagerEx::initWithBinary(const char* file, cocos2d::Ref *root, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) { std::string path = file; @@ -86,7 +86,7 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); stExpCocoNode *actionNode = NULL; for (int i=0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + std::string key = stChildArray[i].GetName(cocoLoader); if (key == "actionlist") { actionNode = &stChildArray[i]; break; @@ -99,7 +99,7 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V ActionObject* action = new ActionObject(); action->autorelease(); - action->initWithBinary(pCocoLoader, actionNode->GetChildArray(), root); + action->initWithBinary(cocoLoader, actionNode->GetChildArray(), root); actionList.pushBack(action); } diff --git a/cocos/editor-support/cocostudio/CCActionManagerEx.h b/cocos/editor-support/cocostudio/CCActionManagerEx.h index b198f0fa23..ebea434825 100644 --- a/cocos/editor-support/cocostudio/CCActionManagerEx.h +++ b/cocos/editor-support/cocostudio/CCActionManagerEx.h @@ -99,7 +99,7 @@ public: /*init properties with json dictionay*/ void initWithDictionary(const char* jsonName,const rapidjson::Value &dic, Ref* root); - void initWithBinary(const char* file, Ref* root, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode); + void initWithBinary(const char* file, Ref* root, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); /** * Release all actions. diff --git a/cocos/editor-support/cocostudio/CCActionNode.cpp b/cocos/editor-support/cocostudio/CCActionNode.cpp index 33a553be2b..84ec680f15 100644 --- a/cocos/editor-support/cocostudio/CCActionNode.cpp +++ b/cocos/editor-support/cocostudio/CCActionNode.cpp @@ -187,18 +187,18 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic, Ref* root) return atof(value.c_str()); } - void ActionNode::initWithBinary(CocoLoader *pCocoLoader, - stExpCocoNode *pCocoNode, + void ActionNode::initWithBinary(CocoLoader *cocoLoader, + stExpCocoNode *cocoNode, cocos2d::Ref *root) { - stExpCocoNode *stChildNode = pCocoNode; + stExpCocoNode *stChildNode = cocoNode; int actionNodeCount = stChildNode->GetChildNum(); stChildNode = stChildNode[0].GetChildArray(); stExpCocoNode *frameListNode = NULL; for (int i = 0; i < actionNodeCount; ++i) { - std::string key = stChildNode[i].GetName(pCocoLoader); + std::string key = stChildNode[i].GetName(cocoLoader); std::string value = stChildNode[i].GetValue(); if (key == "ActionTag") { setActionTag(valueToInt(value)); @@ -227,7 +227,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic, Ref* root) int framesCount = stFrameChildNode[i].GetChildNum(); stExpCocoNode *innerFrameNode = stFrameChildNode[i].GetChildArray(); for (int j = 0; j < framesCount; j++) { - std::string key = innerFrameNode[j].GetName(pCocoLoader); + std::string key = innerFrameNode[j].GetName(cocoLoader); std::string value = innerFrameNode[j].GetValue(); if (key == "frameid") { @@ -239,7 +239,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic, Ref* root) int tweenParameterCount = innerFrameNode[j].GetChildNum(); stExpCocoNode *tweenParameterArray = innerFrameNode[j].GetChildArray(); for (int k = 0; k < tweenParameterCount; ++k) { - std::string t_key = tweenParameterArray[j].GetName(pCocoLoader); + std::string t_key = tweenParameterArray[j].GetName(cocoLoader); std::string t_value = tweenParameterArray[j].GetValue(); frameTweenParameter.push_back(valueToFloat(t_value)); } diff --git a/cocos/editor-support/cocostudio/CCActionNode.h b/cocos/editor-support/cocostudio/CCActionNode.h index cbccdd0a21..35f3d7391f 100644 --- a/cocos/editor-support/cocostudio/CCActionNode.h +++ b/cocos/editor-support/cocostudio/CCActionNode.h @@ -151,7 +151,7 @@ public: /*init properties with a json dictionary*/ virtual void initWithDictionary(const rapidjson::Value& dic, cocos2d::Ref* root); - virtual void initWithBinary(CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode, Ref* root); + virtual void initWithBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, Ref* root); /** * Gets if the action is done once time. diff --git a/cocos/editor-support/cocostudio/CCActionObject.cpp b/cocos/editor-support/cocostudio/CCActionObject.cpp index 1164bca760..ef23eb3bca 100644 --- a/cocos/editor-support/cocostudio/CCActionObject.cpp +++ b/cocos/editor-support/cocostudio/CCActionObject.cpp @@ -128,15 +128,15 @@ void ActionObject::initWithDictionary(const rapidjson::Value& dic, Ref* root) _fTotalTime = maxLength*_fUnitTime; } -void ActionObject::initWithBinary(CocoLoader *pCocoLoader, - stExpCocoNode *pCocoNode, +void ActionObject::initWithBinary(CocoLoader *cocoLoader, + stExpCocoNode *cocoNode, cocos2d::Ref *root) { - stExpCocoNode *stChildNode = pCocoNode->GetChildArray(); + stExpCocoNode *stChildNode = cocoNode->GetChildArray(); stExpCocoNode *actionNodeList = NULL; - int count = pCocoNode->GetChildNum(); + int count = cocoNode->GetChildNum(); for (int i = 0; i < count; ++i) { - std::string key = stChildNode[i].GetName(pCocoLoader); + std::string key = stChildNode[i].GetName(cocoLoader); std::string value = stChildNode[i].GetValue(); if (key == "name") { setName(value.c_str()); @@ -158,7 +158,7 @@ void ActionObject::initWithBinary(CocoLoader *pCocoLoader, ActionNode* actionNode = new ActionNode(); actionNode->autorelease(); - actionNode->initWithBinary(pCocoLoader, &actionNodeArray[i] , root); + actionNode->initWithBinary(cocoLoader, &actionNodeArray[i] , root); actionNode->setUnitTime(getUnitTime()); diff --git a/cocos/editor-support/cocostudio/CCActionObject.h b/cocos/editor-support/cocostudio/CCActionObject.h index 2c3f7684d6..a53edcfc84 100644 --- a/cocos/editor-support/cocostudio/CCActionObject.h +++ b/cocos/editor-support/cocostudio/CCActionObject.h @@ -164,7 +164,7 @@ public: /*init properties with a json dictionary*/ void initWithDictionary(const rapidjson::Value& dic, cocos2d::Ref* root); - void initWithBinary(CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode, cocos2d::Ref* root); + void initWithBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, cocos2d::Ref* root); /*scheduler update function*/ diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 535b69069e..5ff23298f7 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -1865,11 +1865,11 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, } } - ArmatureData* DataReaderHelper::decodeArmature(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + ArmatureData* DataReaderHelper::decodeArmature(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { ArmatureData *armatureData = new ArmatureData(); armatureData->init(); - stExpCocoNode *pAramtureDataArray = pCocoNode->GetChildArray(); + stExpCocoNode *pAramtureDataArray = cocoNode->GetChildArray(); const char *name = pAramtureDataArray[2].GetValue(); //DICTOOL->getStringValue_json(json, A_NAME); if(name != NULL) { @@ -1886,7 +1886,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, { //const rapidjson::Value &dic = DICTOOL->getSubDictionary_json(json, BONE_DATA, i); //json[BONE_DATA][i]; child = &pBoneChildren[i]; - BoneData *boneData = decodeBone(pCocoLoader, child, dataInfo); + BoneData *boneData = decodeBone(cocoLoader, child, dataInfo); armatureData->addBoneData(boneData); boneData->release(); } @@ -1894,22 +1894,22 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return armatureData; } - BoneData* DataReaderHelper::decodeBone(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + BoneData* DataReaderHelper::decodeBone(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { BoneData *boneData = new BoneData(); boneData->init(); - decodeNode(boneData, pCocoLoader, pCocoNode, dataInfo); + decodeNode(boneData, cocoLoader, cocoNode, dataInfo); - int length = pCocoNode->GetChildNum(); - stExpCocoNode *pBoneChildren = pCocoNode->GetChildArray(); + int length = cocoNode->GetChildNum(); + stExpCocoNode *pBoneChildren = cocoNode->GetChildArray(); stExpCocoNode* child; const char *str = NULL; std::string key; for (int i = 0; i < length; ++i) { child = &pBoneChildren[i]; - key = child->GetName(pCocoLoader); + key = child->GetName(cocoLoader); str = child->GetValue(); if (key.compare(A_NAME) == 0) { @@ -1933,7 +1933,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, stExpCocoNode *pDisplayData = child->GetChildArray(); for (int ii = 0; ii < count; ++ii) { - DisplayData *displayData = decodeBoneDisplay(pCocoLoader, &pDisplayData[ii], dataInfo); + DisplayData *displayData = decodeBoneDisplay(cocoLoader, &pDisplayData[ii], dataInfo); if(displayData == NULL) continue; boneData->addDisplayData(displayData); @@ -1945,13 +1945,13 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return boneData; } - DisplayData* DataReaderHelper::decodeBoneDisplay(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + DisplayData* DataReaderHelper::decodeBoneDisplay(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { - stExpCocoNode* children = pCocoNode->GetChildArray(); + stExpCocoNode* children = cocoNode->GetChildArray(); stExpCocoNode* child = &children[1]; const char *str = NULL; - std::string key = child->GetName(pCocoLoader); + std::string key = child->GetName(cocoLoader); str = child->GetValue(); DisplayData *displayData = NULL; if (key.compare(A_DISPLAY_TYPE) == 0) @@ -1982,7 +1982,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, stExpCocoNode *SkinDataValue = pSkinData->GetChildArray(); for (int i = 0; i < length; ++i) { - key = SkinDataValue[i].GetName(pCocoLoader); + key = SkinDataValue[i].GetName(cocoLoader); str = SkinDataValue[i].GetValue(); if (key.compare(A_X) == 0) { @@ -2021,7 +2021,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, { displayData = new ArmatureDisplayData(); - const char *name = pCocoNode[0].GetValue(); + const char *name = cocoNode[0].GetValue(); if(name != NULL) { ((ArmatureDisplayData *)displayData)->displayName = name; @@ -2031,11 +2031,11 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, case CS_DISPLAY_PARTICLE: { displayData = new ParticleDisplayData(); - length = pCocoNode->GetChildNum(); - stExpCocoNode *pDisplayData = pCocoNode->GetChildArray(); + length = cocoNode->GetChildNum(); + stExpCocoNode *pDisplayData = cocoNode->GetChildArray(); for (int i = 0; i < length; ++i) { - key = pDisplayData[i].GetName(pCocoLoader); + key = pDisplayData[i].GetName(cocoLoader); str = pDisplayData[i].GetValue(); if (key.compare(A_PLIST) == 0) { @@ -2065,12 +2065,12 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return displayData; } - AnimationData* DataReaderHelper::decodeAnimation(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + AnimationData* DataReaderHelper::decodeAnimation(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { AnimationData *aniData = new AnimationData(); - int length = pCocoNode->GetChildNum(); - stExpCocoNode *pAnimationData = pCocoNode->GetChildArray(); + int length = cocoNode->GetChildNum(); + stExpCocoNode *pAnimationData = cocoNode->GetChildArray(); const char *str = NULL; std::string key; stExpCocoNode* child; @@ -2078,7 +2078,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, for (int i = 0; i < length; ++i) { child = &pAnimationData[i]; - key = child->GetName(pCocoLoader); + key = child->GetName(cocoLoader); str = child->GetValue(); if (key.compare(A_NAME) == 0) { @@ -2093,7 +2093,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, stExpCocoNode* movArray = child->GetChildArray(); for( int movnum =0; movnum addMovement(movementData); movementData->release(); } @@ -2102,13 +2102,13 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return aniData; } - MovementData* DataReaderHelper::decodeMovement(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + MovementData* DataReaderHelper::decodeMovement(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { MovementData *movementData = new MovementData(); movementData->scale = 1.0f; - int length = pCocoNode->GetChildNum(); - stExpCocoNode *pMoveDataArray = pCocoNode->GetChildArray(); + int length = cocoNode->GetChildNum(); + stExpCocoNode *pMoveDataArray = cocoNode->GetChildArray(); const char *str = NULL; std::string key; @@ -2116,7 +2116,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, for (int i = 0; i < length; ++i) { child = &pMoveDataArray[i]; - key = child->GetName(pCocoLoader); + key = child->GetName(cocoLoader); str = child->GetValue(); if (key.compare(A_NAME) == 0) { @@ -2183,7 +2183,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, MovementBoneData *movementBoneData; for (int ii = 0; ii < count; ++ii) { - movementBoneData = decodeMovementBone(pCocoLoader, &pMoveBoneData[ii],dataInfo); + movementBoneData = decodeMovementBone(cocoLoader, &pMoveBoneData[ii],dataInfo); movementData->addMovementBoneData(movementBoneData); movementBoneData->release(); } @@ -2192,19 +2192,19 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return movementData; } - MovementBoneData* DataReaderHelper::decodeMovementBone(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + MovementBoneData* DataReaderHelper::decodeMovementBone(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { MovementBoneData *movementBoneData = new MovementBoneData(); movementBoneData->init(); - int length = pCocoNode->GetChildNum(); - stExpCocoNode *pMovementBoneDataArray = pCocoNode->GetChildArray(); + int length = cocoNode->GetChildNum(); + stExpCocoNode *pMovementBoneDataArray = cocoNode->GetChildArray(); stExpCocoNode* movebonechild; const char *str = NULL; for (int i = 0; i < length; ++i) { movebonechild = &pMovementBoneDataArray[i]; - std::string key = movebonechild->GetName(pCocoLoader); + std::string key = movebonechild->GetName(cocoLoader); str = movebonechild->GetValue(); if (key.compare(A_NAME) == 0) { @@ -2226,7 +2226,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, stExpCocoNode *pFrameDataArray = movebonechild->GetChildArray(); for (int ii = 0; ii < count; ++ii) { - FrameData *frameData = decodeFrame(pCocoLoader, &pFrameDataArray[ii], dataInfo); + FrameData *frameData = decodeFrame(cocoLoader, &pFrameDataArray[ii], dataInfo); movementBoneData->addFrameData(frameData); frameData->release(); @@ -2286,18 +2286,18 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return movementBoneData; } - FrameData* DataReaderHelper::decodeFrame(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + FrameData* DataReaderHelper::decodeFrame(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, DataInfo *dataInfo) { FrameData *frameData = new FrameData(); - decodeNode(frameData, pCocoLoader, pCocoNode, dataInfo); + decodeNode(frameData, cocoLoader, cocoNode, dataInfo); - int length = pCocoNode->GetChildNum(); - stExpCocoNode *pFrameDataArray = pCocoNode->GetChildArray(); + int length = cocoNode->GetChildNum(); + stExpCocoNode *pFrameDataArray = cocoNode->GetChildArray(); const char *str = NULL; for (int i = 0; i < length; ++i) { - std::string key = pFrameDataArray[i].GetName(pCocoLoader); + std::string key = pFrameDataArray[i].GetName(cocoLoader); str = pFrameDataArray[i].GetValue(); if (key.compare(A_TWEEN_EASING) == 0) { @@ -2390,33 +2390,33 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return frameData; } - TextureData* DataReaderHelper::decodeTexture(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + TextureData* DataReaderHelper::decodeTexture(CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { TextureData *textureData = new TextureData(); textureData->init(); - if(pCocoNode == NULL) + if(cocoNode == nullptr) { return textureData; } - int length = pCocoNode->GetChildNum(); - stExpCocoNode *pTextureDataArray = pCocoNode->GetChildArray(); - const char *str = NULL; + int length = cocoNode->GetChildNum(); + stExpCocoNode *pTextureDataArray = cocoNode->GetChildArray(); + const char *str = nullptr; for (int i = 0; i < length; ++i) { - std::string key = pTextureDataArray[i].GetName(pCocoLoader); + std::string key = pTextureDataArray[i].GetName(cocoLoader); str = pTextureDataArray[i].GetValue(); if (key.compare(A_NAME) == 0) { - if(str != NULL) + if(str != nullptr) { textureData->name = str; } } else if (key.compare(A_WIDTH) == 0) { - if(str != NULL) + if(str != nullptr) { textureData->width = atof(str); } @@ -2448,7 +2448,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, stExpCocoNode *pContourArray = pTextureDataArray[i].GetChildArray(); for (int ii = 0; ii < count; ++ii) { - ContourData *contourData = decodeContour(pCocoLoader, &pContourArray[ii]); + ContourData *contourData = decodeContour(cocoLoader, &pContourArray[ii]); textureData->contourDataList.pushBack(contourData); contourData->release(); } @@ -2457,17 +2457,17 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return textureData; } - ContourData* DataReaderHelper::decodeContour(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + ContourData* DataReaderHelper::decodeContour(CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { ContourData *contourData = new ContourData(); contourData->init(); - int length = pCocoNode->GetChildNum(); - stExpCocoNode *verTexPointArray = pCocoNode->GetChildArray(); - const char *str = NULL; + int length = cocoNode->GetChildNum(); + stExpCocoNode *verTexPointArray = cocoNode->GetChildArray(); + const char *str = nullptr; for (int i = 0; i < length; ++i) { - std::string key = verTexPointArray[i].GetName(pCocoLoader); + std::string key = verTexPointArray[i].GetName(cocoLoader); str = verTexPointArray[i].GetValue(); if (key.compare(VERTEX_POINT) == 0) { @@ -2487,10 +2487,10 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, return contourData; } - void DataReaderHelper::decodeNode(BaseData *node, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo) + void DataReaderHelper::decodeNode(BaseData *node, CocoLoader *cocoLoader, stExpCocoNode* cocoNode, DataInfo *dataInfo) { - int length = pCocoNode->GetChildNum(); - stExpCocoNode *NodeArray = pCocoNode->GetChildArray(); + int length = cocoNode->GetChildNum(); + stExpCocoNode *NodeArray = cocoNode->GetChildArray(); const char *str = NULL; bool isVersionL = dataInfo->cocoStudioVersion < VERSION_COLOR_READING; @@ -2498,7 +2498,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, for (int i = 0; i < length; ++i) { child = &NodeArray[i]; - std::string key = child->GetName(pCocoLoader); + std::string key = child->GetName(cocoLoader); str = child->GetValue(); if (key.compare(A_X) == 0) { @@ -2532,7 +2532,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, { if (!isVersionL) { - if (child->GetType(pCocoLoader) == rapidjson::kObjectType) + if (child->GetType(cocoLoader) == rapidjson::kObjectType) { if(child->GetChildNum() == 4) { @@ -2559,7 +2559,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, if(colorcoount>0) { - if (NodeArray[0].GetType(pCocoLoader) == rapidjson::kObjectType) + if (NodeArray[0].GetType(cocoLoader) == rapidjson::kObjectType) { if(NodeArray[0].GetChildNum() == 4) { diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.h b/cocos/editor-support/cocostudio/CCDataReaderHelper.h index f7a042b542..d591e63543 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.h +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.h @@ -180,19 +180,19 @@ public: // for binary decode public: static void addDataFromBinaryCache(const char *fileContent, DataInfo *dataInfo = NULL); - static ArmatureData *decodeArmature(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static BoneData *decodeBone(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static DisplayData *decodeBoneDisplay(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static AnimationData *decodeAnimation(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static MovementData *decodeMovement(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static ArmatureData *decodeArmature(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static BoneData *decodeBone(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static DisplayData *decodeBoneDisplay(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static AnimationData *decodeAnimation(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static MovementData *decodeMovement(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static MovementBoneData *decodeMovementBone(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static FrameData *decodeFrame(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static MovementBoneData *decodeMovementBone(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static FrameData *decodeFrame(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); - static TextureData *decodeTexture(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode); - static ContourData *decodeContour(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode); + static TextureData *decodeTexture(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode); + static ContourData *decodeContour(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode); - static void decodeNode(BaseData *node, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); + static void decodeNode(BaseData *node, CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo); protected: void loadData(); diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index a6aa95f679..639253409c 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -1218,17 +1218,17 @@ Widget* WidgetPropertiesReader0300::createWidget(const rapidjson::Value& data, c return widget; } - cocos2d::ui::Widget* WidgetPropertiesReader0300::createWidgetFromBinary(CocoLoader* pCocoLoader,stExpCocoNode* pCocoNode, const char* fileName) + cocos2d::ui::Widget* WidgetPropertiesReader0300::createWidgetFromBinary(CocoLoader* cocoLoader,stExpCocoNode* cocoNode, const char* fileName) { - stExpCocoNode *tpChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *tpChildArray = cocoNode->GetChildArray(); float fileDesignWidth; float fileDesignHeight; Widget* widget = nullptr; - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = tpChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = tpChildArray[i].GetName(cocoLoader); if (key == "textures") { int texturesCount = tpChildArray[i].GetChildNum(); @@ -1257,11 +1257,11 @@ Widget* WidgetPropertiesReader0300::createWidget(const rapidjson::Value& data, c stExpCocoNode *widgetTreeNode = &tpChildArray[i]; - rapidjson::Type tType = tpChildArray[i].GetType(pCocoLoader); + rapidjson::Type tType = tpChildArray[i].GetType(cocoLoader); if (rapidjson::kObjectType == tType) { - widget = widgetFromBinary(pCocoLoader, widgetTreeNode); + widget = widgetFromBinary(cocoLoader, widgetTreeNode); } if (widget->getContentSize().equals(Size::ZERO)) @@ -1274,12 +1274,12 @@ Widget* WidgetPropertiesReader0300::createWidget(const rapidjson::Value& data, c /* ********************** */ /* ********************** */ - stExpCocoNode *optionChildNode = pCocoNode->GetChildArray(); - for (int k = 0; k < pCocoNode->GetChildNum(); ++k) { - std::string key = optionChildNode[k].GetName(pCocoLoader); + stExpCocoNode *optionChildNode = cocoNode->GetChildArray(); + for (int k = 0; k < cocoNode->GetChildNum(); ++k) { + std::string key = optionChildNode[k].GetName(cocoLoader); if (key == "animation") { Ref* rootWidget = (Ref*) widget; - ActionManagerEx::getInstance()->initWithBinary(fileName,rootWidget,pCocoLoader, &optionChildNode[k]); + ActionManagerEx::getInstance()->initWithBinary(fileName,rootWidget,cocoLoader, &optionChildNode[k]); break; } } @@ -1287,17 +1287,17 @@ Widget* WidgetPropertiesReader0300::createWidget(const rapidjson::Value& data, c return widget; } -Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) +Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* cocoLoader, stExpCocoNode* cocoNode) { Widget* widget = nullptr; - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); stExpCocoNode *optionsNode = nullptr; stExpCocoNode *childrenNode = nullptr; - int elementCount = pCocoNode->GetChildNum(); + int elementCount = cocoNode->GetChildNum(); std::string classname; for (int i = 0; i < elementCount; ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); if (key == "classname" ) @@ -1326,7 +1326,7 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* pCocoLoader, s if (reader) { // widget parse with widget reader - setPropsForAllWidgetFromBinary(reader, widget, pCocoLoader,optionsNode); + setPropsForAllWidgetFromBinary(reader, widget, cocoLoader,optionsNode); } else { @@ -1336,13 +1336,13 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* pCocoLoader, s if (reader && widget) { - setPropsForAllWidgetFromBinary(reader, widget, pCocoLoader, optionsNode); + setPropsForAllWidgetFromBinary(reader, widget, cocoLoader, optionsNode); // 2nd., custom widget parse with custom reader //2nd. parse custom property const char* customProperty = NULL; stExpCocoNode *optionChildNode = optionsNode->GetChildArray(); for (int k = 0; k < optionsNode->GetChildNum(); ++k) { - std::string key = optionChildNode[k].GetName(pCocoLoader); + std::string key = optionChildNode[k].GetName(cocoLoader); if (key == "customProperty") { customProperty = optionChildNode[k].GetValue(); break; @@ -1364,17 +1364,17 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* pCocoLoader, s //parse children if (nullptr != childrenNode) { - rapidjson::Type tType22 = childrenNode->GetType(pCocoLoader); + rapidjson::Type tType22 = childrenNode->GetType(cocoLoader); if (tType22 == rapidjson::kArrayType) { int childrenCount = childrenNode->GetChildNum(); stExpCocoNode* innerChildArray = childrenNode->GetChildArray(); for (int i=0; i < childrenCount; ++i) { - rapidjson::Type tType = innerChildArray[i].GetType(pCocoLoader); + rapidjson::Type tType = innerChildArray[i].GetType(cocoLoader); if (tType == rapidjson::kObjectType) { - Widget *child = widgetFromBinary(pCocoLoader, &innerChildArray[i]); + Widget *child = widgetFromBinary(cocoLoader, &innerChildArray[i]); if (child) { @@ -1417,10 +1417,10 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* pCocoLoader, s void WidgetPropertiesReader0300::setPropsForAllWidgetFromBinary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, - stExpCocoNode* pCocoNode) + CocoLoader* cocoLoader, + stExpCocoNode* cocoNode) { - reader->setPropsFromBinary(widget, pCocoLoader, pCocoNode); + reader->setPropsFromBinary(widget, cocoLoader, cocoNode); } diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.h b/cocos/editor-support/cocostudio/CCSGUIReader.h index 5077ba1736..e7b8e6be26 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.h +++ b/cocos/editor-support/cocostudio/CCSGUIReader.h @@ -104,16 +104,16 @@ public: const rapidjson::Value& customOptions) = 0; //add binary parsing - virtual cocos2d::ui::Widget* createWidgetFromBinary(CocoLoader* pCocoLoader,stExpCocoNode* pCocoNode, const char* fileName)=0; - virtual cocos2d::ui::Widget* widgetFromBinary(CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) = 0; + virtual cocos2d::ui::Widget* createWidgetFromBinary(CocoLoader* cocoLoader,stExpCocoNode* pCocoNode, const char* fileName)=0; + virtual cocos2d::ui::Widget* widgetFromBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) = 0; virtual void setPropsForAllWidgetFromBinary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) = 0; virtual void setPropsForAllCustomWidgetFromBinary(const std::string& classType, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) = 0; protected: @@ -143,21 +143,21 @@ public: virtual cocos2d::ui::Widget* widgetFromJsonDictionary(const rapidjson::Value& dic); //added for binary parsing - virtual cocos2d::ui::Widget* createWidgetFromBinary(CocoLoader* pCocoLoader, + virtual cocos2d::ui::Widget* createWidgetFromBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, const char* fileName)override{return nullptr;} - virtual cocos2d::ui::Widget* widgetFromBinary(CocoLoader* pCocoLoader, + virtual cocos2d::ui::Widget* widgetFromBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode){return nullptr;} virtual void setPropsForAllWidgetFromBinary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) {} virtual void setPropsForAllCustomWidgetFromBinary(const std::string& classType, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) {} virtual void setPropsForWidgetFromJsonDictionary(cocos2d::ui::Widget* widget,const rapidjson::Value& options); @@ -196,21 +196,21 @@ public: //add bin parse support - virtual cocos2d::ui::Widget* createWidgetFromBinary(CocoLoader* pCocoLoader, + virtual cocos2d::ui::Widget* createWidgetFromBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, const char* fileName)override; - virtual cocos2d::ui::Widget* widgetFromBinary(CocoLoader* pCocoLoader, + virtual cocos2d::ui::Widget* widgetFromBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); virtual void setPropsForAllWidgetFromBinary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); virtual void setPropsForAllCustomWidgetFromBinary(const std::string& classType, cocos2d::ui::Widget* widget, - CocoLoader* pCocoLoader, + CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) { //TODO: custom property } diff --git a/cocos/editor-support/cocostudio/CocoLoader.cpp b/cocos/editor-support/cocostudio/CocoLoader.cpp index 36ff4a4ed4..90dfd12ecf 100644 --- a/cocos/editor-support/cocostudio/CocoLoader.cpp +++ b/cocos/editor-support/cocostudio/CocoLoader.cpp @@ -122,19 +122,19 @@ stExpCocoNode* stExpCocoNode::GetChildArray() return (stExpCocoNode*)m_ChildArray; } -void stExpCocoNode::ReBuild(char* pCocoNodeAddr,char* pStringMemoryAddr) +void stExpCocoNode::ReBuild(char* cocoNodeAddr,char* pStringMemoryAddr) { m_szValue = m_szValue + (uint64_t)pStringMemoryAddr; if( -1 == m_AttribIndex ) { if(m_ChildNum > 0) { - m_ChildArray = m_ChildArray + (uint64_t)pCocoNodeAddr; + m_ChildArray = m_ChildArray + (uint64_t)cocoNodeAddr; stExpCocoNode* tpChildArray = (stExpCocoNode*)m_ChildArray; for(int i = 0 ; i < m_ChildNum ; i++) { - tpChildArray[i].ReBuild(pCocoNodeAddr,pStringMemoryAddr); + tpChildArray[i].ReBuild(cocoNodeAddr,pStringMemoryAddr); } } } diff --git a/cocos/editor-support/cocostudio/CocoLoader.h b/cocos/editor-support/cocostudio/CocoLoader.h index 7ccb736dc8..adf2394f97 100644 --- a/cocos/editor-support/cocostudio/CocoLoader.h +++ b/cocos/editor-support/cocostudio/CocoLoader.h @@ -97,7 +97,7 @@ public: stExpCocoNode* GetChildArray(); public: - inline void ReBuild(char* pCocoNodeAddr,char* pStringMemoryAddr); + inline void ReBuild(char* cocoNodeAddr,char* pStringMemoryAddr); void WriteJson(CocoLoader* pCoco, void* pFileName = NULL, int vLayer = 0, bool bEndNode = false, bool bParentNodeIsArray = false); }; diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp index e7ddf5d638..e809e207df 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp @@ -57,21 +57,21 @@ namespace cocostudio CC_SAFE_DELETE(instanceButtonReader); } - void ButtonReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void ButtonReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { - WidgetReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + WidgetReader::setPropsFromBinary(widget, cocoLoader, cocoNode); Button *button = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); this->beginSetBasicProperties(widget); float capsx = 0.0f, capsy = 0.0, capsWidth = 0.0, capsHeight = 0.0f; int cri = 255, cgi = 255, cbi = 255; float scale9Width = 0.0f, scale9Height = 0.0f; - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); // CCLOG("Button: key = %s, value = %d", key.c_str(), i); @@ -91,7 +91,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); button->loadTextureNormal(backgroundValue, imageFileNameType); @@ -103,7 +103,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); button->loadTexturePressed(backgroundValue, imageFileNameType); @@ -115,7 +115,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); button->loadTextureDisabled(backgroundValue, imageFileNameType); diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h index 4f3be3170c..d2ba76cbde 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h @@ -42,7 +42,7 @@ namespace cocostudio virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode); + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp index baceef63fa..6cf60f4f84 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp @@ -38,15 +38,15 @@ namespace cocostudio return instanceCheckBoxReader; } - void CheckBoxReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void CheckBoxReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { CheckBox *checkBox = static_cast(widget); this->beginSetBasicProperties(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); // CCLOG("key = %s, index : %d", key.c_str(), i); //read all basic properties of widget @@ -61,7 +61,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); checkBox->loadTextureBackGround(backgroundValue, imageFileNameType); }else if(key == P_BackGroundBoxSelectedData){ @@ -70,7 +70,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); checkBox->loadTextureBackGroundSelected(backgroundValue, imageFileNameType); }else if(key == P_FrontCrossData){ @@ -79,7 +79,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); checkBox->loadTextureFrontCross(backgroundValue, imageFileNameType); }else if(key == P_BackGroundBoxDisabledData){ @@ -88,7 +88,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); checkBox->loadTextureBackGroundDisabled(backgroundValue, imageFileNameType); }else if (key == P_FrontCrossDisabledData){ @@ -97,7 +97,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); checkBox->loadTextureFrontCrossDisabled(backgroundValue, imageFileNameType); } diff --git a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h index 01c10e1298..1c934dfb99 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode); + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp index 5b8e58b9f4..537fdeebfb 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp @@ -42,18 +42,18 @@ namespace cocostudio return instanceImageViewReader; } - void ImageViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void ImageViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { - WidgetReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + WidgetReader::setPropsFromBinary(widget, cocoLoader, cocoNode); ImageView* imageView = static_cast(widget); this->beginSetBasicProperties(widget); float capsx = 0.0f, capsy = 0.0, capsWidth = 0.0, capsHeight = 0.0f; - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget @@ -70,7 +70,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); imageView->loadTexture(backgroundValue, imageFileNameType); diff --git a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h index e0672de4f6..27dd31eab5 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode); + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp index e39570d322..7c381ea5f5 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp @@ -54,14 +54,14 @@ namespace cocostudio return instanceLayoutReader; } - void LayoutReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void LayoutReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { - WidgetReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + WidgetReader::setPropsFromBinary(widget, cocoLoader, cocoNode); Layout* panel = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); this->beginSetBasicProperties(widget); int cr=0, cg = 0, cb = 0; @@ -72,8 +72,8 @@ namespace cocostudio Layout::Type layoutType; int bgColorOpacity = panel->getBackGroundColorOpacity(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget @@ -126,7 +126,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); panel->setBackGroundImage(backgroundValue, imageFileNameType); } diff --git a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h index db69aadfa3..77518df738 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp index 1cc5301062..cf1bdbee4e 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp @@ -35,16 +35,16 @@ namespace cocostudio return instanceListViewReader; } - void ListViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void ListViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode* cocoNode) { - ScrollViewReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + ScrollViewReader::setPropsFromBinary(widget, cocoLoader, cocoNode); ListView* listView = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); if (key == P_Direction) { diff --git a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h index d327559ff7..226ac4fac8 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp index 9aaef346c8..92c23aa86d 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp @@ -42,19 +42,19 @@ namespace cocostudio return instanceLoadingBar; } - void LoadingBarReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void LoadingBarReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { - WidgetReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + WidgetReader::setPropsFromBinary(widget, cocoLoader, cocoNode); LoadingBar* loadingBar = static_cast(widget); this->beginSetBasicProperties(widget); float capsx = 0.0f, capsy = 0.0, capsWidth = 0.0, capsHeight = 0.0f; int percent = loadingBar->getPercent(); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget @@ -72,7 +72,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); loadingBar->loadTexture(backgroundValue, imageFileNameType); diff --git a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h index d1d3ca2ef0..7a08aa7e04 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp index ea4c08a796..6c741f5832 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp @@ -33,9 +33,9 @@ namespace cocostudio return instancePageViewReader; } - void PageViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void PageViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { - LayoutReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + LayoutReader::setPropsFromBinary(widget, cocoLoader, cocoNode); } void PageViewReader::setPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options) diff --git a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h index 59a1b17c3c..63f6f446ab 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* cocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp index a7318281c4..fb77972c2b 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp @@ -37,18 +37,18 @@ namespace cocostudio return instanceScrollViewReader; } - void ScrollViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void ScrollViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode* cocoNode) { //TODO::need to refactor... - LayoutReader::setPropsFromBinary(widget, pCocoLoader, pCocoNode); + LayoutReader::setPropsFromBinary(widget, cocoLoader, cocoNode); ScrollView* scrollView = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); float innerWidth; float innerHeight; - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); if (key == P_InnerWidth) { innerWidth = valueToFloat(value); diff --git a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h index 1ceb268dd7..ce95c3b5f7 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp index 8a185ac288..e117f61e24 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp @@ -43,7 +43,7 @@ namespace cocostudio return instanceSliderReader; } - void SliderReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void SliderReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode* cocoNode) { this->beginSetBasicProperties(widget); @@ -51,10 +51,10 @@ namespace cocostudio float barLength = 0.0f; int percent = slider->getPercent(); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget @@ -74,7 +74,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); slider->loadBarTexture(backgroundValue, imageFileNameType); @@ -86,7 +86,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); slider->loadSlidBallTextureNormal(backgroundValue, imageFileNameType); @@ -96,7 +96,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); slider->loadSlidBallTexturePressed(backgroundValue, imageFileNameType); @@ -106,7 +106,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); slider->loadSlidBallTextureDisabled(backgroundValue, imageFileNameType); @@ -116,7 +116,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); slider->loadProgressBarTexture(backgroundValue, imageFileNameType); diff --git a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h index c32a818c02..2ea5f002ff 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp index 0934240e10..d634c5cd39 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp @@ -41,22 +41,22 @@ namespace cocostudio return instanceTextAtalsReader; } - void TextAtlasReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void TextAtlasReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { this->beginSetBasicProperties(widget); TextAtlas* labelAtlas = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); Widget::TextureResType type; std::string charMapFileName; std::string stringValue; std::string startCharMap; float itemWidth; float itemHeight; - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget @@ -73,7 +73,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); charMapFileName = backgroundValue; type = imageFileNameType; diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h index bae1cf7a94..99a00444c1 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h @@ -40,7 +40,7 @@ namespace cocostudio static TextAtlasReader* getInstance(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp index cfcb5503d3..f20326ba9b 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp @@ -35,17 +35,17 @@ namespace cocostudio return instanceTextBMFontReader; } - void TextBMFontReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void TextBMFontReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { this->beginSetBasicProperties(widget); TextBMFont* labelBMFont = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget CC_BASIC_PROPERTY_BINARY_READER @@ -58,7 +58,7 @@ namespace cocostudio Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType); - std::string backgroundValue = this->getResourcePath(pCocoLoader, &stChildArray[i], imageFileNameType); + std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType); if (imageFileNameType == (Widget::TextureResType)0) { labelBMFont->setFntFile(backgroundValue); } diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h index 211b5af9d6..4fdc193a40 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp index a7073ae485..5f56526e03 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp @@ -43,16 +43,16 @@ namespace cocostudio return instanceTextFieldReader; } - void TextFieldReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void TextFieldReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode* cocoNode) { this->beginSetBasicProperties(widget); TextField* textField = static_cast(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h index fe6c9d60d5..bcd01d0021 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) ; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ; }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp index d66bc19352..f7f0170bc7 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp @@ -41,17 +41,17 @@ namespace cocostudio return instanceTextReader; } - void TextReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode) + void TextReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode) { this->beginSetBasicProperties(widget); - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); Text* label = static_cast(widget); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); //read all basic properties of widget CC_BASIC_PROPERTY_BINARY_READER diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h index 09feb66b16..9482ecbe60 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h @@ -41,7 +41,7 @@ namespace cocostudio static void purge(); virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode); + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); }; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp index a735e854f7..5a4bb92783 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp @@ -291,9 +291,9 @@ namespace cocostudio return imageFileName_tp; } - std::string WidgetReader::getResourcePath(CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, cocos2d::ui::Widget::TextureResType texType) + std::string WidgetReader::getResourcePath(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, cocos2d::ui::Widget::TextureResType texType) { - stExpCocoNode *backGroundChildren = pCocoNode->GetChildArray(); + stExpCocoNode *backGroundChildren = cocoNode->GetChildArray(); std::string backgroundValue = backGroundChildren[0].GetValue(); if (backgroundValue.size() < 3) { @@ -342,14 +342,14 @@ namespace cocostudio } } - void WidgetReader::setPropsFromBinary(cocos2d::ui::Widget *widget, cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode) + void WidgetReader::setPropsFromBinary(cocos2d::ui::Widget *widget, cocostudio::CocoLoader *cocoLoader, cocostudio::stExpCocoNode *cocoNode) { - stExpCocoNode *stChildArray = pCocoNode->GetChildArray(); + stExpCocoNode *stChildArray = cocoNode->GetChildArray(); this->beginSetBasicProperties(widget); - for (int i = 0; i < pCocoNode->GetChildNum(); ++i) { - std::string key = stChildArray[i].GetName(pCocoLoader); + for (int i = 0; i < cocoNode->GetChildNum(); ++i) { + std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(); CC_BASIC_PROPERTY_BINARY_READER diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h index e30d50fc98..a4945b4d4c 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h @@ -53,7 +53,7 @@ namespace cocostudio virtual void setColorPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode); + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode); protected: std::string getResourcePath(const rapidjson::Value& dict, const std::string& key, @@ -61,7 +61,7 @@ namespace cocostudio void setAnchorPointForWidget(cocos2d::ui::Widget* widget, const rapidjson::Value&options); - std::string getResourcePath(CocoLoader* pCocoLoader, + std::string getResourcePath(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, cocos2d::ui::Widget::TextureResType texType); @@ -182,7 +182,7 @@ namespace cocostudio ui::Margin mg; \ int paramType = -1; \ for (int j = 0; j < stChildArray[i].GetChildNum(); ++j) { \ - std::string innerKey = layoutCocosNode[j].GetName(pCocoLoader); \ + std::string innerKey = layoutCocosNode[j].GetName(cocoLoader); \ std::string innerValue = layoutCocosNode[j].GetValue(); \ if (innerKey == P_Type) { \ paramType = valueToInt(innerValue); \ diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h b/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h index 605a97acab..c1494017cb 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h @@ -48,7 +48,7 @@ namespace cocostudio public: virtual ~WidgetReaderProtocol() {}; virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options) = 0; - virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* pCocoLoader, stExpCocoNode* pCocoNode) = 0; + virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) = 0; }; }