MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / grepTileLayer

Function grepTileLayer

source/utility/map_grep.cpp:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void grepTileLayer(SearchParameters const& search, TMXMapPtr map, TMXTileLayerPtr tileLayer, MatchReporter callback) {
40 tileLayer->forEachTile(map.get(),
41 [&](Vec2I pos, Tile const& tile) {
42 if (auto tileName = matchTile(search, static_cast<Tiled::Tile const&>(tile)))
43 callback(*tileName, pos);
44 return false;
45 });
46}
47
48void grepObjectGroup(SearchParameters const& search, TMXObjectGroupPtr objectGroup, MatchReporter callback) {
49 for (auto object : objectGroup->objects()) {

Callers 1

grepMapFunction · 0.85

Calls 3

matchTileFunction · 0.85
forEachTileMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected