MCPcopy Create free account
hub / github.com/DFHack/dfhack / is_rectangular

Function is_rectangular

plugins/blueprint.cpp:689–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687}
688
689static bool is_rectangular(const df::building *bld) {
690 const df::building::T_room &room = bld->room;
691 if (!room.extents)
692 return true;
693 for (int32_t y = 0; y < room.height; ++y) {
694 for (int32_t x = 0; x < room.width; ++x) {
695 if (!room.extents[y * room.width + x])
696 return false;
697 }
698 }
699 return true;
700}
701
702static bool is_rectangular(const tile_context &ctx) {
703 return is_rectangular(ctx.b);

Callers 3

do_extent_buildingFunction · 0.85
get_tile_placeFunction · 0.85
get_tile_zoneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected