Moved everything around to let meson build the libraries, but I suspect I have too much SFML support gear for it to be useable.

This commit is contained in:
Zed A. Shaw 2025-05-07 12:21:34 -04:00
parent 560f506733
commit 838f54a4f4
22 changed files with 36 additions and 26 deletions

54
lel.hpp
View file

@ -1,54 +0,0 @@
#pragma once
#include <string>
#include <unordered_map>
#include <optional>
#include <vector>
namespace lel {
struct Cell {
int x = 0;
int y = 0;
int w = 0;
int h = 0;
int mid_x = 0;
int mid_y = 0;
int max_w = 0;
int max_h = 0;
int col = 0;
int row = 0;
bool right = false;
bool bottom = false;
bool expand = false;
bool center = false;
bool percent = false;
Cell(int col, int row) : col(col), row(row) {}
Cell() {}
};
using Row = std::vector<std::string>;
using CellMap = std::unordered_map<std::string, Cell>;
struct Parser {
int grid_x = 0;
int grid_y = 0;
int grid_w = 0;
int grid_h = 0;
Cell cur;
std::vector<Row> grid;
CellMap cells;
Parser(int x, int y, int width, int height);
Parser();
void position(int x, int y, int width, int height);
void id(std::string name);
void reset();
bool parse(std::string input);
void finalize();
std::optional<std::string> hit(int x, int y);
};
Cell center(int width, int height, Cell &parent);
}