commits
this avoids creating a copy of the tileset on every tile beforehand, but
makes a shallow copy when looking up a tile.
this is a breaking change as we now return the Tile and Tileset in a
result struct instead of the Tile itself...which typing that out I don't
know if I like
Not sure if this is making things more unreadable in an attempt at keeping this kind of stuff DRY
* fix and update examples
* specifying LICENCE is standard
* use just one list of layers
* increment version
* bump version
* add object template support
Move Object into its own module (src/object.zig) and add support for
.tj template files. When an object references a template, field values
and properties from the template are applied as defaults; instance values
always take precedence. Instance properties with the same key as a
template property correctly free the template allocation before replacing
it.
* fix property_type default, add optimize build option
- Property.property_type defaults to null to avoid requiring callers to
set it explicitly
- Expose standardOptimizeOption in the build so the module respects
release modes
- Remove empty propertytype strings from test fixture
- Bump version to 0.2.4
* add tests for object template field inheritance and property merging
Test that template field values are applied when absent from the instance
(height, rotation), that instance values take precedence (width, name,
visible), and that properties from both sources are merged with instance
winning on key conflicts. Adds dedicated fixture files to cover the
property-override case not exercised by the existing map.tmj.
Should make it easier to have specific maps/tilesets to easily test just
the conditions we are wanting to verify - without having to copy the
same properties over to each test map.
Fix parsing for infinite maps with chunks starting in negative coordi…
This will make it easier to open and use the test maps and tilesets in
Tiled.
- restructures repo to move tests to a separate module, so consumers
don't have to download a bunch of test files
- removes comptime based jsonParser for now
This adds two new methods to the tmz API: `initTilesetFromSlice` and
`initTilesetFromFile` that will parse a JSON formatted Tileset document
into a `tmz.Tileset` struct.
Project generated with `zig build init`. Boilerplate, exe build and
`main.zig` removed. Replaced `root.zig` with empty `tmz.zig`. Removed
generated comments
Flake initialized using a Zig overlay with this command:
`nix flake init -t 'github:mitchellh/zig-overlay#init'`
Used https://github.com/mitchellh/libxev/blob/main/README.md as
reference.
* fix and update examples
* specifying LICENCE is standard
* use just one list of layers
* increment version
* bump version
* add object template support
Move Object into its own module (src/object.zig) and add support for
.tj template files. When an object references a template, field values
and properties from the template are applied as defaults; instance values
always take precedence. Instance properties with the same key as a
template property correctly free the template allocation before replacing
it.
* fix property_type default, add optimize build option
- Property.property_type defaults to null to avoid requiring callers to
set it explicitly
- Expose standardOptimizeOption in the build so the module respects
release modes
- Remove empty propertytype strings from test fixture
- Bump version to 0.2.4
* add tests for object template field inheritance and property merging
Test that template field values are applied when absent from the instance
(height, rotation), that instance values take precedence (width, name,
visible), and that properties from both sources are merged with instance
winning on key conflicts. Adds dedicated fixture files to cover the
property-override case not exercised by the existing map.tmj.