| 200 | } |
| 201 | |
| 202 | bool CompareLayers(const char aaMapNames[3][64], CDataFileReader aInputMaps[2]) |
| 203 | { |
| 204 | int aStart[2], aNum[2]; |
| 205 | for(int i = 0; i < 2; i++) |
| 206 | aInputMaps[i].GetType(MAPITEMTYPE_LAYER, &aStart[i], &aNum[i]); |
| 207 | |
| 208 | if(aNum[0] != aNum[1]) |
| 209 | { |
| 210 | dbg_msg("map_replace_area", "ERROR: different layers quantity"); |
| 211 | for(int i = 0; i < 2; i++) |
| 212 | dbg_msg("map_replace_area", " \"%s\": %d layers", aaMapNames[i], aNum[i]); |
| 213 | return false; |
| 214 | } |
| 215 | |
| 216 | for(int i = 0; i < aNum[0]; i++) |
| 217 | { |
| 218 | CMapItemLayer *apItem[2]; |
| 219 | for(int j = 0; j < 2; j++) |
| 220 | apItem[j] = (CMapItemLayer *)aInputMaps[j].GetItem(aStart[j] + i); |
| 221 | |
| 222 | if(apItem[0]->m_Type != apItem[1]->m_Type) |
| 223 | { |
| 224 | dbg_msg("map_replace_area", "ERROR: different types on layer #%d", i); |
| 225 | for(int j = 0; j < 2; j++) |
| 226 | dbg_msg("map_replace_area", " \"%s\": %s", aaMapNames[j], apItem[j]->m_Type == LAYERTYPE_TILES ? "tiles layer" : "quad layer"); |
| 227 | return false; |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | return true; |
| 232 | } |
| 233 | |
| 234 | void CompareGroups(const char aaMapNames[3][64], CDataFileReader aInputMaps[2]) |
| 235 | { |
no test coverage detected