Skip to content

Commit

Permalink
Update for Tiled 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Zer0-One committed Mar 11, 2024
1 parent 06fc3d7 commit 9699ee0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ set(CMAKE_C_STANDARD 17)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_FLAGS_RELEASE "-O2")
if(WIN32)
set(CMAKE_C_FLAGS_DEBUG "-Z7")
set(CMAKE_C_FLAGS_DEBUG "-Od -Z7")
else()
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -fsanitize=address -fsanitize=undefined")
endif()
Expand Down
16 changes: 2 additions & 14 deletions include/tmj.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,17 @@ typedef struct Text{
int pixelsize;
} Text;

typedef enum OBJECT_TYPE{
OBJECT,
ELLIPSE,
RECTANGLE,
POINT,
POLYGON,
POLYLINE,
TEXT
} object_type;

/**
* https://doc.mapeditor.org/en/stable/reference/json-map-format/#object
*/
typedef struct Object {
object_type type;

bool ellipse;
bool point;
bool visible;

char* class; // Optional
char* name;
char* template;
char* type; // Optional

int gid;
int id;
Expand Down Expand Up @@ -221,8 +209,8 @@ typedef struct Frame {
* https://doc.mapeditor.org/en/stable/reference/json-map-format/#tile-definition
*/
typedef struct Tile {
char* class; // Optional
char* image; // Optional
char* type; // Optional

int id;
int imageheight;
Expand Down
2 changes: 1 addition & 1 deletion src/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ uint8_t* tmj_zlib_decompress(const uint8_t* data, size_t data_size, size_t* deco
return NULL;
}

logmsg(TMJ_LOG_DEBUG, "Decode (zlib): Z_BUF_TMJ_LOG_ERROR");
logmsg(TMJ_LOG_DEBUG, "Decode (zlib): Z_BUF_ERROR");
case Z_OK:
logmsg(TMJ_LOG_DEBUG, "Decode (zlib): inflate OK");

Expand Down
4 changes: 2 additions & 2 deletions src/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,17 @@ Object* unpack_objects(json_t* objects){
0,
"{"
"s?b, s?b, s:b,"
"s?s, s:s, s?s,"
"s:s, s?s, s?s,"
"s?i, s:i,"
"s:F, s:F, s:F, s:F, s:F,"
"s?o"
"}",
"ellipse", &ret[idx].ellipse,
"point", &ret[idx].point,
"visible", &ret[idx].visible,
"class", &ret[idx].class,
"name", &ret[idx].name,
"template", &ret[idx].template,
"type", &ret[idx].type,
"gid", &ret[idx].gid,
"id", &ret[idx].id,
"height", &ret[idx].height,
Expand Down
2 changes: 1 addition & 1 deletion src/tileset.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ int unpack_tileset(json_t* tileset, Tileset* ret){
"s?F,"
"s?o, s?o, s?o, s?o"
"}",
"class", &ret->tiles[idx].class,
"image", &ret->tiles[idx].image,
"type", &ret->tiles[idx].type,
"id", &ret->tiles[idx].id,
"imageheight", &ret->tiles[idx].imageheight,
"imagewidth", &ret->tiles[idx].imagewidth,
Expand Down
2 changes: 1 addition & 1 deletion test/Unity
Submodule Unity updated 54 files
+4 −1 .github/workflows/main.yml
+6 −0 .gitignore
+1 −0 CMakeLists.txt
+1 −1 LICENSE.txt
+11 −5 README.md
+1 −1 auto/colour_reporter.rb
+15 −0 auto/extract_version.py
+20 −16 auto/generate_module.rb
+50 −24 auto/generate_test_runner.rb
+83 −22 auto/parse_output.rb
+54 −39 auto/stylize_as_junit.py
+1 −1 auto/stylize_as_junit.rb
+1 −0 auto/test_file_filter.rb
+1 −1 auto/type_sanitizer.rb
+7 −3 auto/unity_test_summary.rb
+5 −2 auto/yaml_helper.rb
+18 −0 docs/MesonGeneratorRunner.md
+68 −57 docs/UnityAssertionsReference.md
+93 −0 docs/UnityChangeLog.md
+144 −1 docs/UnityConfigurationGuide.md
+289 −1 docs/UnityHelperScriptsGuide.md
+13 −0 docs/UnityKnownIssues.md
+48 −0 examples/example_1/meson.build
+8 −1 examples/example_1/readme.txt
+3 −0 examples/example_1/subprojects/unity.wrap
+17 −18 examples/example_3/rakefile_helper.rb
+40 −0 extras/bdd/readme.md
+44 −0 extras/bdd/src/unity_bdd.h
+9 −0 extras/bdd/test/meson.build
+128 −0 extras/bdd/test/test_bdd.c
+10 −0 extras/fixture/src/meson.build
+9 −0 extras/memory/src/meson.build
+5 −2 library.json
+71 −4 meson.build
+3 −0 meson_options.txt
+17 −0 platformio-build.py
+10 −4 src/meson.build
+218 −41 src/unity.c
+21 −7 src/unity.h
+80 −31 src/unity_internals.h
+6 −4 test/.rubocop.yml
+1 −0 test/testdata/Defs.h
+11 −3 test/testdata/testRunnerGenerator.c
+1 −5 test/testdata/testRunnerGeneratorSmall.c
+0 −4 test/testdata/testRunnerGeneratorWithMocks.c
+40 −2 test/tests/test_generate_test_runner.rb
+1 −1 test/tests/test_unity_arrays.c
+1 −1 test/tests/test_unity_core.c
+41 −0 test/tests/test_unity_doubles.c
+41 −0 test/tests/test_unity_floats.c
+1 −1 test/tests/test_unity_integers_64.c
+140 −3 test/tests/test_unity_parameterized.c
+21 −0 test/tests/test_unity_parameterizedDemo.c
+14 −0 test/tests/types_for_test.h

0 comments on commit 9699ee0

Please sign in to comment.