Brought over a bunch of code from the roguelike and now will use it to generate a random map.

This commit is contained in:
Zed A. Shaw 2025-01-30 11:38:57 -05:00
parent 8d3d3b4ec3
commit 2daa1c9bd5
59 changed files with 4303 additions and 411 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <vector>
#include "tser.hpp"
struct Point {
size_t x = 0;
@ -8,11 +9,13 @@ struct Point {
bool operator==(const Point& other) const {
return other.x == x && other.y == y;
}
DEFINE_SERIALIZABLE(Point, x, y);
};
typedef std::vector<Point> PointList;
struct PointHash {
template<> struct std::hash<Point> {
size_t operator()(const Point& p) const {
return std::hash<int>()(p.x) ^ std::hash<int>()(p.y);
}