不同版本cocos2d-x的CCB/CCBI加载器研究

不同版本cocos2d-x的CCB/CCBI加载器研究


cocos2d-2.1beta3-x-2.1.1

相关文件:

\cocos2d-2.1beta3-x-2.1.1\extensions\CCBReader\CCBReader.h

\cocos2d-2.1beta3-x-2.1.1\extensions\CCBReader\CCBReader.cpp


CCBReader.h

    /* Utility methods. */
    static std::string lastPathComponent(const char* pString);
    static std::string deletePathExtension(const char* pString);
    static std::string toLowerCase(const char* pCCString);
    static bool endsWith(const char* pString, const char* pEnding);

    /* Parse methods. */
    int readInt(bool pSigned);
    unsigned char readByte();
    bool readBool();
    std::string readUTF8();
    float readFloat();
    std::string readCachedString();
    bool isJSControlled();


CCBReader.cpp

234:
CCNode* CCBReader::readNodeGraphFromFile(const char *pCCBFileName, CCObject *pOwner, const CCSize &parentSize)
{


}


↓


263:
CCNode* CCBReader::readNodeGraphFromData(CCData *pData, CCObject *pOwner, const CCSize &parentSize)
{


}




readFileWithCleanUp


setAnimationManagers


530:
CCNode *pNode = readNodeGraph(NULL);



你可能感兴趣的:(不同版本cocos2d-x的CCB/CCBI加载器研究)