| 53 | } |
| 54 | |
| 55 | void grepMap(SearchParameters const& search, String file) { |
| 56 | auto map = make_shared<TMXMap>(Json::parseJson(File::readFileString(file))); |
| 57 | |
| 58 | for (auto tileLayer : map->tileLayers()) |
| 59 | grepTileLayer(search, map, tileLayer, [&](String const& tileName, Vec2I const& pos) { |
| 60 | coutf("{}: {}: {} @ {}\n", file, tileLayer->name(), tileName, pos); |
| 61 | }); |
| 62 | |
| 63 | for (auto objectGroup : map->objectGroups()) |
| 64 | grepObjectGroup(search, objectGroup, [&](String const& tileName, Vec2I const& pos) { |
| 65 | coutf("{}: {}: {} @ {}\n", file, objectGroup->name(), tileName, pos); |
| 66 | }); |
| 67 | } |
| 68 | |
| 69 | void grepDirectory(SearchParameters const& search, String directory) { |
| 70 | for (pair<String, bool> entry : File::dirList(directory)) { |
no test coverage detected