25 lines
441 B
C
25 lines
441 B
C
|
#pragma once
|
||
|
|
||
|
#include <map>
|
||
|
|
||
|
#include "map/generator.h"
|
||
|
#include "map/region.h"
|
||
|
#include "util/vector2.h"
|
||
|
|
||
|
class Map {
|
||
|
public:
|
||
|
Map() = default;
|
||
|
|
||
|
Node &at(Vector2<int> pos);
|
||
|
void set_tile(Vector2<int> pos, Tile *tile);
|
||
|
|
||
|
void save();
|
||
|
void load();
|
||
|
|
||
|
private:
|
||
|
Region load_or_create_region(Vector2<int> pos);
|
||
|
|
||
|
std::map<Vector2<int>, Region> m_reigons;
|
||
|
Generator m_grass;
|
||
|
};
|