@@ -809,6 +809,7 @@ namespace quicktype {
809
809
810
810
private:
811
811
bool active;
812
+ double alpha;
812
813
bool break_on_match;
813
814
double chance;
814
815
Checker checker;
@@ -845,6 +846,10 @@ namespace quicktype {
845
846
bool & get_mutable_active () { return active; }
846
847
void set_active (const bool & value) { this ->active = value; }
847
848
849
+ const double & get_alpha () const { return alpha; }
850
+ double & get_mutable_alpha () { return alpha; }
851
+ void set_alpha (const double & value) { this ->alpha = value; }
852
+
848
853
/* *
849
854
* When TRUE, the rule will prevent other rules to be applied in the same cell if it matches
850
855
* (TRUE by default).
@@ -1137,11 +1142,13 @@ namespace quicktype {
1137
1142
bool parallax_scaling;
1138
1143
int64_t px_offset_x;
1139
1144
int64_t px_offset_y;
1145
+ bool render_in_world_view;
1140
1146
std::vector<std::string> required_tags;
1141
1147
double tile_pivot_x;
1142
1148
double tile_pivot_y;
1143
1149
boost::optional<int64_t > tileset_def_uid;
1144
1150
Type layer_definition_type;
1151
+ boost::optional<std::string> ui_color;
1145
1152
int64_t uid;
1146
1153
1147
1154
public:
@@ -1290,6 +1297,14 @@ namespace quicktype {
1290
1297
int64_t & get_mutable_px_offset_y () { return px_offset_y; }
1291
1298
void set_px_offset_y (const int64_t & value) { this ->px_offset_y = value; }
1292
1299
1300
+ /* *
1301
+ * If TRUE, the content of this layer will be used when rendering levels in a simplified way
1302
+ * for the world view
1303
+ */
1304
+ const bool & get_render_in_world_view () const { return render_in_world_view; }
1305
+ bool & get_mutable_render_in_world_view () { return render_in_world_view; }
1306
+ void set_render_in_world_view (const bool & value) { this ->render_in_world_view = value; }
1307
+
1293
1308
/* *
1294
1309
* An array of tags to filter Entities that can be added to this layer
1295
1310
*/
@@ -1330,6 +1345,12 @@ namespace quicktype {
1330
1345
Type & get_mutable_layer_definition_type () { return layer_definition_type; }
1331
1346
void set_layer_definition_type (const Type & value) { this ->layer_definition_type = value; }
1332
1347
1348
+ /* *
1349
+ * User defined color for the UI
1350
+ */
1351
+ boost::optional<std::string> get_ui_color () const { return ui_color; }
1352
+ void set_ui_color (boost::optional<std::string> value) { this ->ui_color = value; }
1353
+
1333
1354
/* *
1334
1355
* Unique Int identifier
1335
1356
*/
@@ -1886,13 +1907,21 @@ namespace quicktype {
1886
1907
virtual ~TileInstance () = default ;
1887
1908
1888
1909
private:
1910
+ double a;
1889
1911
std::vector<int64_t > d;
1890
1912
int64_t f;
1891
1913
std::vector<int64_t > px;
1892
1914
std::vector<int64_t > src;
1893
1915
int64_t t;
1894
1916
1895
1917
public:
1918
+ /* *
1919
+ * Alpha/opacity of the tile (0-1, defaults to 1)
1920
+ */
1921
+ const double & get_a () const { return a; }
1922
+ double & get_mutable_a () { return a; }
1923
+ void set_a (const double & value) { this ->a = value; }
1924
+
1896
1925
/* *
1897
1926
* Internal data used by the editor.<br/> For auto-layer tiles: `[ruleId, coordId]`.<br/>
1898
1927
* For tile-layer tiles: `[coordId]`.
@@ -3323,6 +3352,7 @@ namespace quicktype {
3323
3352
3324
3353
inline void from_json (const json & j, AutoLayerRuleDefinition& x) {
3325
3354
x.set_active (j.at (" active" ).get <bool >());
3355
+ x.set_alpha (j.at (" alpha" ).get <double >());
3326
3356
x.set_break_on_match (j.at (" breakOnMatch" ).get <bool >());
3327
3357
x.set_chance (j.at (" chance" ).get <double >());
3328
3358
x.set_checker (j.at (" checker" ).get <Checker>());
@@ -3355,6 +3385,7 @@ namespace quicktype {
3355
3385
inline void to_json (json & j, const AutoLayerRuleDefinition & x) {
3356
3386
j = json::object ();
3357
3387
j[" active" ] = x.get_active ();
3388
+ j[" alpha" ] = x.get_alpha ();
3358
3389
j[" breakOnMatch" ] = x.get_break_on_match ();
3359
3390
j[" chance" ] = x.get_chance ();
3360
3391
j[" checker" ] = x.get_checker ();
@@ -3440,11 +3471,13 @@ namespace quicktype {
3440
3471
x.set_parallax_scaling (j.at (" parallaxScaling" ).get <bool >());
3441
3472
x.set_px_offset_x (j.at (" pxOffsetX" ).get <int64_t >());
3442
3473
x.set_px_offset_y (j.at (" pxOffsetY" ).get <int64_t >());
3474
+ x.set_render_in_world_view (j.at (" renderInWorldView" ).get <bool >());
3443
3475
x.set_required_tags (j.at (" requiredTags" ).get <std::vector<std::string>>());
3444
3476
x.set_tile_pivot_x (j.at (" tilePivotX" ).get <double >());
3445
3477
x.set_tile_pivot_y (j.at (" tilePivotY" ).get <double >());
3446
3478
x.set_tileset_def_uid (get_stack_optional<int64_t >(j, " tilesetDefUid" ));
3447
3479
x.set_layer_definition_type (j.at (" type" ).get <Type>());
3480
+ x.set_ui_color (get_stack_optional<std::string>(j, " uiColor" ));
3448
3481
x.set_uid (j.at (" uid" ).get <int64_t >());
3449
3482
}
3450
3483
@@ -3471,11 +3504,13 @@ namespace quicktype {
3471
3504
j[" parallaxScaling" ] = x.get_parallax_scaling ();
3472
3505
j[" pxOffsetX" ] = x.get_px_offset_x ();
3473
3506
j[" pxOffsetY" ] = x.get_px_offset_y ();
3507
+ j[" renderInWorldView" ] = x.get_render_in_world_view ();
3474
3508
j[" requiredTags" ] = x.get_required_tags ();
3475
3509
j[" tilePivotX" ] = x.get_tile_pivot_x ();
3476
3510
j[" tilePivotY" ] = x.get_tile_pivot_y ();
3477
3511
j[" tilesetDefUid" ] = x.get_tileset_def_uid ();
3478
3512
j[" type" ] = x.get_layer_definition_type ();
3513
+ j[" uiColor" ] = x.get_ui_color ();
3479
3514
j[" uid" ] = x.get_uid ();
3480
3515
}
3481
3516
@@ -3649,6 +3684,7 @@ namespace quicktype {
3649
3684
}
3650
3685
3651
3686
inline void from_json (const json & j, TileInstance& x) {
3687
+ x.set_a (j.at (" a" ).get <double >());
3652
3688
x.set_d (j.at (" d" ).get <std::vector<int64_t >>());
3653
3689
x.set_f (j.at (" f" ).get <int64_t >());
3654
3690
x.set_px (j.at (" px" ).get <std::vector<int64_t >>());
@@ -3658,6 +3694,7 @@ namespace quicktype {
3658
3694
3659
3695
inline void to_json (json & j, const TileInstance & x) {
3660
3696
j = json::object ();
3697
+ j[" a" ] = x.get_a ();
3661
3698
j[" d" ] = x.get_d ();
3662
3699
j[" f" ] = x.get_f ();
3663
3700
j[" px" ] = x.get_px ();
0 commit comments