Looks like this is _possibly_ working but the last step of actually loading a save needs to be figured out.

This commit is contained in:
Zed A. Shaw 2024-11-06 07:18:59 -05:00
parent 6add24fed2
commit 99d56b246c
5 changed files with 37 additions and 9 deletions

View file

@ -6,6 +6,7 @@
#include <algorithm>
#include <fmt/core.h>
#include "point.hpp"
#include "tser.hpp"
#define INV_WALL 0
#define INV_SPACE 1
@ -19,6 +20,8 @@ struct Room {
size_t height = 0;
Point entry;
Point exit;
DEFINE_SERIALIZABLE(Room, x, y, width, height);
};
typedef std::vector<int> MatrixRow;
@ -28,12 +31,12 @@ void dump_map(const std::string &msg, Matrix &map);
void add_neighbors(Matrix &closed, size_t j, size_t i);
class Map {
public:
Matrix $input_map;
Matrix $walls;
Matrix $paths;
std::vector<Room> $rooms;
int $limit = 0;
public:
// make explicit
Map(Matrix input_map, Matrix walls_map, int limit) :