diff options
-rw-r--r-- | src/main.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -62,11 +62,11 @@ static int process_imagelayer(cJSON *json) { if (process_layer(json)) return -1; JSON_GET_STRING(json, image); - JSON_GET(json, x); - JSON_GET(json, y) + JSON_GET(json, offsetx); + JSON_GET(json, offsety) - printf(".imagelayer={\"%s\",%d,%d}},", image->valuestring, x->valueint, - y->valueint); + printf(".imagelayer={\"%s\",%d,%d}},", image->valuestring, offsetx->valueint, + offsety->valueint); return 0; } @@ -114,10 +114,11 @@ static int process_object(cJSON *json) { JSON_GET(json, height); JSON_GET(json, rotation); JSON_GET(json, visible); - printf("{\"%s\",\"%s\",%d,%d,%d,%d,%d,%d,%f,%d", name->valuestring, - type->valuestring, id->valueint, tile ? tile->valueint : 0, - x->valueint, y->valueint, width->valueint, height->valueint, - rotation->valuedouble, cJSON_IsTrue(visible)); + printf("{\"%s\",\"%s\",%d,%u,%d,%d,%d,%d,%f,%d", name->valuestring, + type->valuestring, id->valueint, + tile ? (unsigned)tile->valuedouble : 0, x->valueint, y->valueint, + width->valueint, height->valueint, rotation->valuedouble, + cJSON_IsTrue(visible)); cJSON *properties = cJSON_GetObjectItem(json, "properties"); if (!cJSON_IsArray(properties) || cJSON_GetArraySize(properties) == 0) |