mirror of https://github.com/axmolengine/axmol.git
issue #72,debug link error
This commit is contained in:
parent
408a34603b
commit
aad6392555
|
@ -34,9 +34,9 @@ THE SOFTWARE.
|
|||
|
||||
namespace cocos2d {
|
||||
|
||||
void startElement(void *ctx, const xmlChar *name, const xmlChar **atts);
|
||||
void endElement(void *ctx, const xmlChar *name);
|
||||
void characters(void *ctx, const xmlChar *ch, int len);
|
||||
void plist_startElement(void *ctx, const xmlChar *name, const xmlChar **atts);
|
||||
void plist_endElement(void *ctx, const xmlChar *name);
|
||||
void plist_characters(void *ctx, const xmlChar *ch, int len);
|
||||
|
||||
typedef std::pair<std::string, void*> Pair;
|
||||
typedef enum
|
||||
|
@ -90,9 +90,9 @@ public:
|
|||
memset( &saxHandler, 0, sizeof(saxHandler) );
|
||||
// Using xmlSAXVersion( &saxHandler, 2 ) generate crash as it sets plenty of other pointers...
|
||||
saxHandler.initialized = XML_SAX2_MAGIC; // so we do this to force parsing as SAX2.
|
||||
saxHandler.startElement = &startElement;
|
||||
saxHandler.endElement = &endElement;
|
||||
saxHandler.characters = &characters;
|
||||
saxHandler.startElement = &plist_startElement;
|
||||
saxHandler.endElement = &plist_endElement;
|
||||
saxHandler.characters = &plist_characters;
|
||||
|
||||
int result = xmlSAXUserParseMemory( &saxHandler, this, buffer, size );
|
||||
if ( result != 0 )
|
||||
|
@ -111,7 +111,7 @@ public:
|
|||
return m_pRootDict;
|
||||
}
|
||||
};
|
||||
void startElement(void *ctx, const xmlChar *name, const xmlChar **atts)
|
||||
void plist_startElement(void *ctx, const xmlChar *name, const xmlChar **atts)
|
||||
{
|
||||
CCDictMaker *pMaker = static_cast<CCDictMaker*>(ctx);
|
||||
std::string sName((char*)name);
|
||||
|
@ -153,7 +153,7 @@ void startElement(void *ctx, const xmlChar *name, const xmlChar **atts)
|
|||
pMaker->m_tState = SAX_NONE;
|
||||
}
|
||||
}
|
||||
void endElement(void *ctx, const xmlChar *name)
|
||||
void plist_endElement(void *ctx, const xmlChar *name)
|
||||
{
|
||||
CCDictMaker * pMaker = static_cast<CCDictMaker*>(ctx);
|
||||
std::string sName((char*)name);
|
||||
|
@ -167,7 +167,7 @@ void endElement(void *ctx, const xmlChar *name)
|
|||
}
|
||||
pMaker->m_tState = SAX_NONE;
|
||||
}
|
||||
void characters(void *ctx, const xmlChar *ch, int len)
|
||||
void plist_characters(void *ctx, const xmlChar *ch, int len)
|
||||
{
|
||||
CCDictMaker * pMaker = static_cast<CCDictMaker*>(ctx);
|
||||
if (pMaker->m_tState == SAX_NONE)
|
||||
|
|
|
@ -33,9 +33,9 @@ THE SOFTWARE.
|
|||
|
||||
namespace cocos2d {
|
||||
|
||||
void startElement(void *ctx, const xmlChar *name, const xmlChar **atts);
|
||||
void endElement(void *ctx, const xmlChar *name);
|
||||
void characters(void *ctx, const xmlChar *ch, int len);
|
||||
void tmx_startElement(void *ctx, const xmlChar *name, const xmlChar **atts);
|
||||
void tmx_endElement(void *ctx, const xmlChar *name);
|
||||
void tmx_characters(void *ctx, const xmlChar *ch, int len);
|
||||
const char * valueForKey(std::string key, StringToStringDictionary dict);
|
||||
|
||||
// implementation CCTMXLayerInfo
|
||||
|
@ -141,9 +141,9 @@ namespace cocos2d {
|
|||
memset( &saxHandler, 0, sizeof(saxHandler) );
|
||||
// Using xmlSAXVersion( &saxHandler, 2 ) generate crash as it sets plenty of other pointers...
|
||||
saxHandler.initialized = XML_SAX2_MAGIC; // so we do this to force parsing as SAX2.
|
||||
saxHandler.startElement = &startElement;
|
||||
saxHandler.endElement = &endElement;
|
||||
saxHandler.characters = &characters;
|
||||
saxHandler.startElement = &tmx_startElement;
|
||||
saxHandler.endElement = &tmx_endElement;
|
||||
saxHandler.characters = &tmx_characters;
|
||||
|
||||
int result = xmlSAXUserParseMemory( &saxHandler, this, buffer, size );
|
||||
if ( result != 0 )
|
||||
|
@ -182,7 +182,7 @@ namespace cocos2d {
|
|||
|
||||
}
|
||||
// the XML parser calls here with all the elements
|
||||
void startElement(void *ctx, const xmlChar *name, const xmlChar **atts)
|
||||
void tmx_startElement(void *ctx, const xmlChar *name, const xmlChar **atts)
|
||||
{
|
||||
CCTMXMapInfo *pTMXMapInfo = (CCTMXMapInfo*)(ctx);
|
||||
std::string elementName = (char*)name;
|
||||
|
@ -424,7 +424,7 @@ namespace cocos2d {
|
|||
}
|
||||
}
|
||||
|
||||
void endElement(void *ctx, const xmlChar *name)
|
||||
void tmx_endElement(void *ctx, const xmlChar *name)
|
||||
{
|
||||
CCTMXMapInfo *pTMXMapInfo = (CCTMXMapInfo*)(ctx);
|
||||
std::string elementName = (char*)name;
|
||||
|
@ -489,7 +489,7 @@ namespace cocos2d {
|
|||
pTMXMapInfo->setParentElement(TMXPropertyNone);
|
||||
}
|
||||
}
|
||||
void characters(void *ctx, const xmlChar *ch, int len)
|
||||
void tmx_characters(void *ctx, const xmlChar *ch, int len)
|
||||
{
|
||||
CCTMXMapInfo *pTMXMapInfo = (CCTMXMapInfo*)(ctx);
|
||||
std::string pText((char*)ch,0,len);
|
||||
|
|
Loading…
Reference in New Issue