Euphoria
world.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "io/json.h"
4 
5 namespace eu::files::world
6 {
7  struct vec2f
8  {
9  float x;
10  float y;
11  };
12 
13  struct Property
14  {
15  std::string name;
16 
17  // only one is valid
18  std::optional<vec2f> vec2f_value;
19  };
20 
21  struct Object
22  {
23  std::string template_name;
24  std::vector<Property> properties;
25  };
26 
27  struct World
28  {
29  std::vector<Object> objects;
30  };
31 
33 }
JSON_PARSE_FUNC(vec2f)
Definition: world.cc:5
std::string template_name
Definition: world.h:23
std::vector< Property > properties
Definition: world.h:24
std::string name
Definition: world.h:15
std::optional< vec2f > vec2f_value
Definition: world.h:18
std::vector< Object > objects
Definition: world.h:29