The tiled_map will be null, as cute_tiled will fail to parse it with the "class" field. After removing this field manually, you will be able to load the map properly.
Proposed solution while "class" is not implemented
Add the following case on the switch inside the function cute_tiled_read_object:
case 1485919047363370797U: // class
CUTE_TILED_WARNING("Class field of Tiled objects is not yet supported. Ignoring field.");
while (cute_tiled_peak(m) != ',' && cute_tiled_peak(m) != '}') cute_tiled_next(m);
if (cute_tiled_peak(m) == '}') continue;
break;
This will ignore the field class when trying to read an object. The while is looking for both ',' and '}' to avoid breaking the parsing in case the user passes the field.
And add the following to the struct cute_tiled_object_t
This looks great! Please add a pull request for this. Do you know how? I can send instructions — you can do it from the browser with just copy + paste.
Apparently, since Tiled 1.9, the field "class" is exported by default in the Objects on an Object Layer.
An example of a simple object inside an object layer:
It breaks the function cute_tiled_load_map_from_file, making it return null even on very simple cases.
Steps to reproduce
Proposed solution while "class" is not implemented
Add the following case on the switch inside the function cute_tiled_read_object:
This will ignore the field class when trying to read an object. The while is looking for both ',' and '}' to avoid breaking the parsing in case the user passes the field.
And add the following to the struct cute_tiled_object_t