summaryrefslogtreecommitdiff
path: root/src/tag.h
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2023-12-15 23:02:45 -0500
committerFreya Murphy <freya@freyacat.org>2023-12-15 23:02:45 -0500
commit42d1c82a0bfa615b832f5ecc2652edc290bf6e9c (patch)
tree09223f3ca9b54fc3cd5a7cb45180542cc3a8a1ba /src/tag.h
parentfix printing arrays (diff)
downloadnbtvis-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.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/tag.h b/src/tag.h
index 93eff64..d0033a5 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -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);
+