|
|
@ -127,6 +127,7 @@ class TMXParser{ |
|
|
|
while (f.good()) { |
|
|
|
while (f.good()) { |
|
|
|
std::string data; |
|
|
|
std::string data; |
|
|
|
f>>data; |
|
|
|
f>>data; |
|
|
|
|
|
|
|
if (data.empty()) continue; |
|
|
|
|
|
|
|
|
|
|
|
if (accumulator.length()>0) { |
|
|
|
if (accumulator.length()>0) { |
|
|
|
//We're accumulating strings until we find '>'
|
|
|
|
//We're accumulating strings until we find '>'
|
|
|
@ -148,6 +149,9 @@ class TMXParser{ |
|
|
|
data = data.substr(data.find(",")+1,std::string::npos); |
|
|
|
data = data.substr(data.find(",")+1,std::string::npos); |
|
|
|
rowData.push_back(stoi(datapiece)); |
|
|
|
rowData.push_back(stoi(datapiece)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (data.length()) { |
|
|
|
|
|
|
|
rowData.push_back(stoi(data)); |
|
|
|
|
|
|
|
} |
|
|
|
parsedMapInfo.LayerData[parsedMapInfo.LayerData.size()-1].tiles.push_back(rowData); |
|
|
|
parsedMapInfo.LayerData[parsedMapInfo.LayerData.size()-1].tiles.push_back(rowData); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|