mirror of https://github.com/axmolengine/axmol.git
fixed #411,support .plist format generated by zwoptex in the last version.
This commit is contained in:
parent
987da86c01
commit
87ea85a986
|
@ -153,6 +153,32 @@ public:
|
|||
m_pArray = NULL;
|
||||
m_bInArray = false;
|
||||
}
|
||||
else if (sName == "true")
|
||||
{
|
||||
CCString *str = new CCString("1");
|
||||
if (m_bInArray)
|
||||
{
|
||||
m_pArray->addObject(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurDict->setObject(str, m_sCurKey);
|
||||
}
|
||||
str->release();
|
||||
}
|
||||
else if (sName == "false")
|
||||
{
|
||||
CCString *str = new CCString("0");
|
||||
if (m_bInArray)
|
||||
{
|
||||
m_pArray->addObject(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurDict->setObject(str, m_sCurKey);
|
||||
}
|
||||
str->release();
|
||||
}
|
||||
m_tState = SAX_NONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,6 +149,32 @@ void endElement(void *ctx, const XML_Char *name)
|
|||
m_pArray->release();
|
||||
m_pArray = NULL;
|
||||
m_bInArray = false;
|
||||
}
|
||||
else if (sName == "true")
|
||||
{
|
||||
CCString *str = new CCString("1");
|
||||
if (m_bInArray)
|
||||
{
|
||||
m_pArray->addObject(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurDict->setObject(str, m_sCurKey);
|
||||
}
|
||||
str->release();
|
||||
}
|
||||
else if (sName == "false")
|
||||
{
|
||||
CCString *str = new CCString("0");
|
||||
if (m_bInArray)
|
||||
{
|
||||
m_pArray->addObject(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurDict->setObject(str, m_sCurKey);
|
||||
}
|
||||
str->release();
|
||||
}
|
||||
m_tState = SAX_NONE;
|
||||
}
|
||||
|
|
|
@ -253,6 +253,32 @@ public:
|
|||
m_pArray = NULL;
|
||||
m_bInArray = false;
|
||||
}
|
||||
else if (sName == "true")
|
||||
{
|
||||
CCString *str = new CCString("1");
|
||||
if (m_bInArray)
|
||||
{
|
||||
m_pArray->addObject(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurDict->setObject(str, m_sCurKey);
|
||||
}
|
||||
str->release();
|
||||
}
|
||||
else if (sName == "false")
|
||||
{
|
||||
CCString *str = new CCString("0");
|
||||
if (m_bInArray)
|
||||
{
|
||||
m_pArray->addObject(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurDict->setObject(str, m_sCurKey);
|
||||
}
|
||||
str->release();
|
||||
}
|
||||
m_tState = SAX_NONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ void CCSpriteFrameCache::addSpriteFramesWithDictionary(CCDictionary<std::string,
|
|||
CCPoint spriteOffset = CCPointFromString(valueForKey("spriteOffset", frameDict));
|
||||
CCSize spriteSourceSize = CCSizeFromString(valueForKey("spriteSourceSize", frameDict));
|
||||
CCRect textureRect = CCRectFromString(valueForKey("textureRect", frameDict));
|
||||
bool textureRotated = atoi(valueForKey("textureRotated", frameDict)) == 0;
|
||||
bool textureRotated = atoi(valueForKey("textureRotated", frameDict)) == 0 ? false : true;
|
||||
|
||||
// get aliases
|
||||
CCMutableArray<CCString*> *aliases = (CCMutableArray<CCString*> *) (frameDict->objectForKey(std::string("aliases")));
|
||||
|
|
Loading…
Reference in New Issue