Go to file
Louis Pearson 511bdab4ed Add readme 2022-08-03 13:09:45 -06:00
src Add more to the test 2022-08-03 12:58:15 -06:00
.gitignore Builds, but parse fails 2022-08-02 19:38:18 -06:00
README.md Add readme 2022-08-03 13:09:45 -06:00
build.zig Initial commit, begin adding LDtk data types 2022-08-02 18:33:24 -06:00

README.md

Zig LDtk

This is a single file library for parsing LDtk JSON files.

Using

Copy LDtk.zig into your project and use like so:

const LDtk = @import("./LDtk.zig");

// ldtk_file should be a `[]const u8` of the file contents
const ldtk = LDtk.parse(allocator, ldtk_file);
defer ldtk.deinit();

// Now you can access your LDtk data through the `ldtk` struct
for (ldtk.levels) {
    // ...
}

Alternatively, add this repository as a git submodule.