MCPcopy Create free account
hub / github.com/bwapi/bwapi / reserveTemplateSpacing

Function reserveTemplateSpacing

bwapi/BWAPILIB/Source/Game.cpp:485–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483 { -1, 0, 0, 0 } // last
484 };
485 void reserveTemplateSpacing(PlacementReserve &reserve)
486 {
487 reserve.backup();
488
489 for ( buildTemplate *t = buildTemplates; t->startX != -1; ++t )
490 {
491 int x = t->startX, y = t->startY;
492 for ( int i = 0; i < 64; ++i )
493 {
494 reserve.setValue(x, y, 0);
495 x += t->stepX;
496 y += t->stepY;
497 }
498 }
499
500 reserve.restoreIfInvalid(__FUNCTION__);
501 }
502
503 // ----- GET BUILD LOCATION
504 // @TODO: If self() is nullptr, this will crash

Callers 1

getBuildLocationMethod · 0.85

Calls 3

backupMethod · 0.80
setValueMethod · 0.80
restoreIfInvalidMethod · 0.80

Tested by

no test coverage detected