diff options
author | Freya Murphy <freya@freyacat.org> | 2023-12-15 23:02:45 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2023-12-15 23:02:45 -0500 |
commit | 42d1c82a0bfa615b832f5ecc2652edc290bf6e9c (patch) | |
tree | 09223f3ca9b54fc3cd5a7cb45180542cc3a8a1ba /src/tag.h | |
parent | fix printing arrays (diff) | |
download | nbtvis-42d1c82a0bfa615b832f5ecc2652edc290bf6e9c.tar.gz nbtvis-42d1c82a0bfa615b832f5ecc2652edc290bf6e9c.tar.bz2 nbtvis-42d1c82a0bfa615b832f5ecc2652edc290bf6e9c.zip |
add json support and other things
Diffstat (limited to 'src/tag.h')
-rw-r--r-- | src/tag.h | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -67,7 +67,13 @@ typedef struct tag_t { char *name; } tag_t; -bool tag_read_header(tag_t *tag, stream_t *stream, bool named); -bool tag_read_data(tag_t *tag, stream_t *stream); -bool tag_read(tag_t *tag, stream_t *stream, bool named); -void tag_print(const tag_t *tag); +typedef enum { + JSON, + NBT, + SNBT +} format_t; + +void tag_free(tag_t *tag); +bool tag_read(tag_t *tag, const stream_t *stream, format_t format); +bool tag_print(tag_t *tag, const stream_t *stream, format_t format); + |