Use a lel:: namespace.
This commit is contained in:
parent
cebf61a794
commit
1620a5420f
6 changed files with 155 additions and 148 deletions
37
lel.hpp
37
lel.hpp
|
@ -1,24 +1,26 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <functional>
|
||||
|
||||
struct Cell {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
int max_w = 0;
|
||||
int max_h = 0;
|
||||
int col = 0;
|
||||
int row = 0;
|
||||
bool right = false;
|
||||
bool bottom = false;
|
||||
bool expand = false;
|
||||
namespace lel {
|
||||
struct Cell {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
int max_w = 0;
|
||||
int max_h = 0;
|
||||
int col = 0;
|
||||
int row = 0;
|
||||
bool right = false;
|
||||
bool bottom = false;
|
||||
bool expand = false;
|
||||
|
||||
Cell(int col, int row) : col(col), row(row) {}
|
||||
};
|
||||
Cell(int col, int row) : col(col), row(row) {}
|
||||
};
|
||||
|
||||
struct LELParser {
|
||||
struct Parser {
|
||||
int grid_x = 0;
|
||||
int grid_y = 0;
|
||||
int grid_w = 0;
|
||||
|
@ -28,7 +30,7 @@ struct LELParser {
|
|||
Cell cur;
|
||||
std::unordered_map<std::string, Cell> cells;
|
||||
|
||||
LELParser(int x, int y, int width, int height);
|
||||
Parser(int x, int y, int width, int height);
|
||||
void col();
|
||||
void ltab();
|
||||
void align(char dir);
|
||||
|
@ -41,4 +43,5 @@ struct LELParser {
|
|||
void reset();
|
||||
bool parse(std::string input);
|
||||
void finalize();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue