aboutsummaryrefslogtreecommitdiff
path: root/MuseumDeserializer.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 15:48:14 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 15:48:14 +0200
commitd8289105193707daede1a5b59137f18e20f20aeb (patch)
tree939908b9c4c6f7aaef8aa61ee2e04be3e85610b6 /MuseumDeserializer.cpp
parent76e61d68bbf568ec0d7fc4632e52d4de5496b003 (diff)
(2/2) rename
Diffstat (limited to 'MuseumDeserializer.cpp')
-rw-r--r--MuseumDeserializer.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/MuseumDeserializer.cpp b/MuseumDeserializer.cpp
new file mode 100644
index 0000000..fca8d50
--- /dev/null
+++ b/MuseumDeserializer.cpp
@@ -0,0 +1,22 @@
+#include "MuseumDeserializer.h"
+#include "TileColorFactory.h"
+
+MuseumDeserializer::MuseumDeserializer(Museum & museum) : museum(museum) { }
+
+void MuseumDeserializer::add_artist(ArtistData data) {
+ this->museum.people.add_artist(data);
+}
+
+void MuseumDeserializer::set_canvas(CanvasData data) {
+ this->museum.canvas.set_data(data);
+}
+
+void MuseumDeserializer::set_tile(TileData data) {
+ this->museum.canvas.set_tile(data);
+}
+
+void MuseumDeserializer::add_type(std::string type, Color color, unsigned int weight) {
+ if (type.length() == 0) return;
+ TileColorFactory::register_color(type, color);
+}
+