Skip to main content

footprint

Function footprint 

Source
pub fn footprint(
    map_size: i32,
    cell: (i32, i32),
    width: i32,
    height: i32,
    rotation: i32,
) -> Option<Rect>
Expand description

The footprint of a width × height building centred on cell (even sizes extend one more cell towards +x/+y), turned by rotation steps (1 and 3 swap the sides). None when it leaves the map (the left column must also be at least 1).

Original: FUN_140102ed0.