aboutsummaryrefslogtreecommitdiff
path: root/Deserializer.cpp
blob: 3c1e5809e07d8713374194ee317042afce12ea65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "Deserializer.h"
#include "TileAppearance.h"

Deserializer::Deserializer(Museum & museum) : museum(museum) { }

void Deserializer::add_artist(ArtistData data) {
	this->museum.people.add_artist(data);
}

void Deserializer::set_canvas(CanvasData data) {
	this->museum.canvas.set_data(data);
}

void Deserializer::add_tile(unsigned int x, unsigned int y, TileData data) {
	this->museum.canvas.set_tile(x, y, data);
}

void Deserializer::add_type(std::string type, Color color, unsigned int weight) {
	if (type.length() == 0) return;
	TileAppearance::register_color(type, color);
}