summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.cpp
blob: d8c2d0110f267ca276ec5e17f8428b3c7be7db37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "chunk.hpp"

namespace floormat {

bool chunk::empty() const
{
    if (!_maybe_empty)
        return false;

    for (const tile& x : _tiles)
        if (x.ground_image || x.wall_north || x.wall_west)
        {
            _maybe_empty = false;
            return false;
        }

    return true;
}

} // namespace floormat