MCPcopy Create free account
hub / github.com/ddnet/ddnet / ReplaceDestinationTiles

Function ReplaceDestinationTiles

src/tools/map_replace_area.cpp:313–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313void ReplaceDestinationTiles(CMapItemLayerTilemap *apTilemap[2], CTile *apTile[2], float aaaReplaceableAreas[2][2][2])
314{
315 int aaaRanges[2][2][2];
316 for(int i = 0; i < 2; i++)
317 ConvertToTiles(aaaReplaceableAreas[i], aaaRanges[i]);
318
319 for(int y0 = aaaRanges[0][1][0], y1 = aaaRanges[1][1][0]; y0 < aaaRanges[0][1][1] && y1 < aaaRanges[1][1][1]; y0++, y1++)
320 for(int x0 = aaaRanges[0][0][0], x1 = aaaRanges[1][0][0]; x0 < aaaRanges[0][0][1] && x1 < aaaRanges[1][0][1]; x0++, x1++)
321 apTile[1][x1 + (y1 * apTilemap[1]->m_Width)] = apTile[0][x0 + (y0 * apTilemap[0]->m_Width)];
322}
323
324bool AdaptVisibleAreas(const float aaaGameAreas[2][2][2], const CMapObject aObs[2], float aaaVisibleAreas[2][2][2])
325{

Callers 1

ReplaceAreaTilesFunction · 0.85

Calls 1

ConvertToTilesFunction · 0.85

Tested by

no test coverage detected