summaryrefslogtreecommitdiffhomepage
path: root/wall-tileset-tool/main.hpp
blob: 0f6d9633eeade9708dfc85f0d50be80bb2bd9899 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "src/wall-atlas.hpp"
#include <vector>
#include <opencv2/core/mat.hpp>

namespace floormat::wall_tool {

struct options
{
    String input_dir, input_file, output_dir;
    bool use_alpha = false;
};

struct frame
{
    cv::Mat4b mat;
    Vector2ui offset{}, size;
};

struct group
{
    std::vector<frame> frames;
    Wall::Group_ G;
};

struct state
{
    options& opts;
    const wall_atlas_def& old_atlas;
    wall_atlas_def& new_atlas;
    std::vector<group>& groups;
    uint32_t& n_frames;
    cv::Mat4b& dest;
    int& error;
};

} // namespace floormat::wall_tool