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

namespace floormat {

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

    for (std::size_t i = 0; i < TILE_COUNT; i++)
    {
        if (_ground_atlases[i] || _wall_north_atlases[i] || _wall_west_atlases[i])
        {
            _maybe_empty = false;
            return false;
        }
    }

    return true;
}

} // namespace floormat