MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / rectangularRegion

Method rectangularRegion

source/gamemap/TileContainer.cpp:479–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479std::vector<Tile*> TileContainer::rectangularRegion(int x1, int y1, int x2, int y2)
480{
481 std::vector<Tile*> returnList;
482 Tile *tempTile;
483
484 if (x1 > x2)
485 std::swap(x1, x2);
486 if (y1 > y2)
487 std::swap(y1, y2);
488
489 for (int ii = x1; ii <= x2; ++ii)
490 {
491 for (int jj = y1; jj <= y2; ++jj)
492 {
493 tempTile = getTile(ii, jj);
494
495 if (tempTile != nullptr)
496 returnList.push_back(tempTile);
497 }
498 }
499
500 return returnList;
501}
502
503std::vector<Tile*> TileContainer::circularRegion(int x, int y, int radius)
504{

Callers 9

checkSellTrapTilesMethod · 0.80
checkSellRoomTilesMethod · 0.80
selectSquaredTilesMethod · 0.80
selectSquaredTilesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected