|
|
@ -390,7 +390,7 @@ class TMXParser{ |
|
|
|
if (newTag.tag.length()==0) { //Tag's empty, so first line is the tag.
|
|
|
|
if (newTag.tag.length()==0) { //Tag's empty, so first line is the tag.
|
|
|
|
newTag.tag=data; |
|
|
|
newTag.tag=data; |
|
|
|
#if _DEBUG |
|
|
|
#if _DEBUG |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("Tag: "<<newTag.tag<<"\n"; |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("Tag: "<<newTag.tag<<"\n"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
std::string key = data.substr(0,data.find("=")); |
|
|
|
std::string key = data.substr(0,data.find("=")); |
|
|
@ -402,7 +402,7 @@ class TMXParser{ |
|
|
|
|
|
|
|
|
|
|
|
newTag.data[key]=value; |
|
|
|
newTag.data[key]=value; |
|
|
|
#if _DEBUG |
|
|
|
#if _DEBUG |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG(" "<<key<<":"<<newTag.data[key]<<"\n"; |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG(" "<<key<<":"<<newTag.data[key]<<"\n"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -534,11 +534,11 @@ class TMXParser{ |
|
|
|
prevZoneData=&zones.back(); |
|
|
|
prevZoneData=&zones.back(); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
#ifdef _DEBUG |
|
|
|
#ifdef _DEBUG |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("Unsupported tag format! Ignoring."<<"\n"; |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("Unsupported tag format! Ignoring."<<"\n"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
#ifdef _DEBUG |
|
|
|
#ifdef _DEBUG |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("\n"<<"=============\n"; |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("\n"<<"=============\n"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
TMXParser::TMXParser(std::string file){ |
|
|
|
TMXParser::TMXParser(std::string file){ |
|
|
@ -682,7 +682,7 @@ class TMXParser{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef _DEBUG |
|
|
|
#ifdef _DEBUG |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("Parsed Map Data:\n"<<parsedMapInfo<<"\n"; |
|
|
|
if(_DEBUG_MAP_LOAD_INFO)LOG("Parsed Map Data:\n"<<parsedMapInfo<<"\n"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |