|
|
@@ -8,7 +8,9 @@
|
|
|
|
|
|
#include "game/engine/serial.hpp"
|
|
|
|
|
|
+#include <fstream>
|
|
|
#include <json/json.h>
|
|
|
+#include <json/reader.h>
|
|
|
|
|
|
#include "game/graphics/manager.hpp"
|
|
|
#include "game/graphics/material.hpp"
|
|
|
@@ -17,6 +19,12 @@
|
|
|
#include "vector/vector.hpp"
|
|
|
|
|
|
namespace engine {
|
|
|
+ Json::Value read_file(std::string const & abs_path) {
|
|
|
+ Json::Value json;
|
|
|
+ std::ifstream(abs_path) >> json;
|
|
|
+ return json;
|
|
|
+ }
|
|
|
+
|
|
|
math::vec2 to_vec2(Json::Value const & json) {
|
|
|
return make_vector(json[0].asFloat(), json[1].asFloat());
|
|
|
}
|